@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;600;700&display=swap");

:root {
  --bg: #ffffff;
  --bg-soft: #f4f7fc;
  --ink: #14171f;
  --ink-soft: #5a6270;
  --line: #e3e8f0;
  --blue: #1668e3;
  --blue-light: #3aa0ff;
  --blue-deep: #0a47c9;
  --blue-tint: #e9f2ff;
  --grad: linear-gradient(135deg, var(--blue-light), var(--blue-deep));
  --night: #0b1730;
  --foot: #111a2c;

  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --serif: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  --max: 1120px;
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h, 81px) + 4px); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 12px; }
h3 { font-size: 19px; margin-bottom: 8px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container--wide { max-width: 1240px; }

/* ===== Header ===== */
body { padding-top: var(--nav-h, 81px); }
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s;
}
.nav.is-scrolled { box-shadow: 0 6px 24px rgba(15, 40, 90, 0.08); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
  max-width: 1240px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo__mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo__stack { display: flex; flex-direction: column; line-height: 1.15; }
.logo__text { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.logo__en { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; color: var(--blue); text-transform: uppercase; margin-top: 3px; }

.nav__links { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 500; color: #3b4150; }
.nav__links a { position: relative; padding: 6px 0; transition: color 0.2s; white-space: nowrap; }
.nav__links a:hover, .nav__links a.is-active { color: var(--blue); }
.nav__links a:not(.nav__mizar)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.nav__links a:not(.nav__mizar):hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.nav__mizar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  color: #24396b;
}
.nav__links a.nav__mizar:hover { border-color: #24396b; color: #24396b; }
.nav__links a.nav__login { margin-left: 4px; padding-left: 22px; border-left: 1px solid var(--line); color: var(--ink-soft); }
.nav__links a.nav__login::after { left: 22px; }
.nav__mizar img { width: 22px; height: 22px; border-radius: 50%; }
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0 11px;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav__toggle span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: translate 0.3s var(--ease), rotate 0.3s var(--ease), opacity 0.2s; }
.nav.is-open .nav__toggle span:nth-child(1) { translate: 0 7px; rotate: 45deg; }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { translate: 0 -7px; rotate: -45deg; }
.nav__mizar span { font-size: 11px; opacity: 0.6; }

.nav__group { position: relative; }
.nav__links a.nav__top { display: block; padding: 6px 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.nav__links a.nav__top.is-active { color: var(--blue); }
.nav__links a.nav__top--drop { padding-right: 15px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a919e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right center / 9px no-repeat; }
.nav__links a.nav__top--drop::after { right: 15px; }
.nav__group:hover > .nav__top::after, .nav__group:focus-within > .nav__top::after { transform: scaleX(1); }
.nav__sub {
  position: absolute;
  top: 100%;
  left: 50%;
  display: grid;
  min-width: 168px;
  padding: 8px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 36px -12px rgba(15, 40, 90, 0.22);
  opacity: 0;
  visibility: hidden;
  translate: -50% 6px;
  transition: opacity 0.2s, translate 0.25s var(--ease), visibility 0s 0.25s;
}
.nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav__group:hover .nav__sub, .nav__group:focus-within .nav__sub { opacity: 1; visibility: visible; translate: -50% 0; transition: opacity 0.2s, translate 0.25s var(--ease); }
.nav__links .nav__sub a { padding: 10px 14px; border-radius: 9px; font-size: 14px; color: #3b4150; transition: background 0.2s, color 0.2s; }
.nav__links .nav__sub a::after { display: none; }
.nav__links .nav__sub a:hover { background: var(--bg-soft); color: var(--blue); }
.nav__links .nav__sub a.is-active { background: var(--blue-tint); font-weight: 700; color: var(--blue); }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100%;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
}

/* ===== Bands (page heroes) ===== */
.band, .page-head {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 72px 0;
  text-align: center;
  color: #fff;
  background: var(--night);
}
.band::before, .page-head::before {
  content: "";
  position: absolute;
  inset: -4%;
  background: var(--img, url("assets/library.jpg")) center / cover no-repeat;
  animation: zoom 24s ease-in-out infinite alternate;
}
.band::after, .page-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(22, 104, 227, 0.62), rgba(8, 28, 84, 0.82));
}
.band > *, .page-head > * { position: relative; z-index: 1; }
@keyframes zoom { from { transform: scale(1); } to { transform: scale(1.08); } }

.band--home { min-height: 440px; }
.band__kicker {
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 300;
  letter-spacing: 0.01em;
  opacity: 0.92;
  animation: rise 1s var(--ease) both;
}
.band__title {
  margin-top: 6px;
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: -0.03em;
  animation: rise 1s var(--ease) 0.12s both;
}
.band__en {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.75;
  animation: rise 1s var(--ease) 0.24s both;
}
@keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }

.page-head { min-height: 260px; }
.page-head .section__num { color: rgba(255, 255, 255, 0.75); justify-content: center; }
.page-head h1 { font-size: clamp(34px, 5vw, 50px); font-weight: 800; color: #fff; margin-bottom: 8px; animation: rise 1s var(--ease) both; }
.page-head .section__desc { color: rgba(255, 255, 255, 0.82); max-width: 640px; margin: 0 auto; animation: rise 1s var(--ease) 0.12s both; }

/* ===== Home intro ===== */
.intro { position: relative; overflow: hidden; padding: 96px 0 72px; }
.intro__deco {
  position: absolute;
  left: -150px;
  top: 90px;
  width: 340px;
  height: 340px;
  opacity: 0.95;
  animation: spin-slow 80s linear infinite;
}
@keyframes spin-slow { to { rotate: 360deg; } }
.intro__text {
  position: relative;
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 16px;
  line-height: 1.9;
  color: #2a2f3a;
  word-break: keep-all;
}
.intro__text p { margin-bottom: 16px; }
.intro__text strong { font-weight: 700; color: var(--ink); }
.intro__text a { color: var(--blue); }
.intro__text a:hover { text-decoration: underline; }
.intro__gap { height: 56px; }
.intro__text ol { padding-left: 24px; margin: 8px 0 0; }
.intro__text li { margin-bottom: 8px; padding-left: 4px; }
.intro__text li::marker { color: var(--blue); font-weight: 700; }

/* ===== Tiles ===== */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-bottom: 48px;
}
.tile { display: block; overflow: hidden; background: var(--bg-soft); }
.tile__img { display: block; overflow: hidden; aspect-ratio: 4 / 3; }
.tile__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.tile__label {
  display: block;
  padding: 14px 12px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  transition: background 0.3s;
}
.tile:hover .tile__img img { transform: scale(1.07); }
.tile:hover .tile__label { background: var(--blue-deep); }

.notes { padding: 8px 0 88px; text-align: center; font-size: 13px; color: var(--ink-soft); }
.notes p + p { margin-top: 10px; }
.notes a { color: var(--blue); }

/* ===== Research page bits ===== */
.epigraph { padding: 72px 0 64px; text-align: center; }
.epigraph__orig { font-family: "Times New Roman", Georgia, serif; font-style: italic; font-size: clamp(18px, 2.2vw, 24px); color: var(--blue); }
.epigraph__ko { margin-top: 10px; font-family: var(--serif); font-size: clamp(17px, 2vw, 21px); font-weight: 600; }
.epigraph cite { display: block; margin-top: 8px; font-style: normal; font-size: 13px; color: var(--ink-soft); }

.card p a { color: var(--blue); }

/* ===== Auth ===== */
.auth { padding: 56px 0 96px; background: var(--bg-soft); }
.auth__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  max-width: 1080px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 60px -30px rgba(15, 40, 90, 0.25);
  overflow: hidden;
  padding: 0;
}
.auth__aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.auth__aside::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--img) center / cover;
  animation: zoom 24s ease-in-out infinite alternate;
}
.auth__aside::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, rgba(22, 104, 227, 0.72), rgba(8, 28, 84, 0.9));
}
.auth__mark { width: 44px; height: 44px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.25)); }
.auth__aside blockquote p { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; line-height: 1.5; letter-spacing: -0.01em; }
.auth__en { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.6; }

.auth__panel { padding: 52px clamp(28px, 5vw, 64px); }
.auth__panel h1 { font-size: 30px; letter-spacing: -0.02em; }
.auth__lead { margin-top: 6px; font-size: 15px; color: var(--ink-soft); }
.auth__form { display: grid; gap: 16px; margin-top: 32px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13.5px; font-weight: 600; }
.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22, 104, 227, 0.1); }
.field__group { display: flex; gap: 8px; }
.field__btn { flex-shrink: 0; padding: 0 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.field__btn:hover { border-color: var(--blue); color: var(--blue); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field__hint { margin-top: -8px; font-size: 12.5px; color: var(--ink-soft); }

.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--blue); }
.auth__link { color: var(--ink-soft); }
.auth__link:hover, .auth__switch a:hover { color: var(--blue); }
.auth__submit { width: 100%; justify-content: center; height: 52px; font-size: 16px; cursor: pointer; }

.terms-box { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; }
.terms-box .check span { flex: 1; }
.terms-box .check b { color: var(--blue); font-weight: 600; }
.terms-box .check a { font-size: 12.5px; color: var(--ink-soft); text-decoration: underline; }
.check--all { padding-bottom: 10px; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--ink); }

.auth__switch { margin-top: 28px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.auth__switch a { margin-left: 4px; font-weight: 700; color: var(--blue); }

.pending {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 32px;
  text-align: center;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.pending__badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}
.pending h2 { margin: 16px 0 10px; font-size: 24px; }
.pending p { color: var(--ink-soft); font-size: 15px; }

.pipeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
}
.pipeline::before {
  content: "";
  position: absolute;
  top: 27px; left: 28px; right: calc((100% - 64px) / 5 - 28px);
  height: 2px;
  background: linear-gradient(90deg, var(--blue-light), var(--blue-deep));
  opacity: 0.35;
}
.pipeline li { position: relative; }
.pipeline__no {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue);
  color: var(--blue);
  font-weight: 800;
  font-size: 15px;
  position: relative;
  transition: background 0.3s, color 0.3s;
}
.pipeline li:last-child .pipeline__no { background: var(--grad); border-color: transparent; color: #fff; }
.pipeline li:hover .pipeline__no { background: var(--blue); color: #fff; }
.pipeline h3 { margin: 22px 0 8px; font-size: 18px; }
.pipeline p { color: var(--ink-soft); font-size: 14.5px; }

.topics {
  margin-top: 56px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.topics__title { font-weight: 800; margin-bottom: 12px; }
.topics ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
.topics li { position: relative; padding-left: 18px; color: var(--ink-soft); font-size: 15px; }
.topics li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

/* Sections */
.section { padding: 120px 0; }
.section--alt { background: var(--bg-soft); }
.section__head { max-width: 640px; margin-bottom: 56px; }
.section__num {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.section__num--light { color: var(--blue-light); }
.section__desc { color: var(--ink-soft); font-size: 18px; }

.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* Cards */
.card {
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 16px 40px rgba(15, 40, 90, 0.1);
}
.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 24px;
}
.card p { color: var(--ink-soft); font-size: 15px; }

/* Feature (Database) */
.feature {
  background:
    radial-gradient(circle at 10% 0%, rgba(58, 160, 255, 0.25), transparent 50%),
    var(--night);
  color: #e6ecf7;
}
.feature__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
}
.feature h2 { color: #fff; }
.feature__body p { color: #aab6cc; margin-bottom: 20px; }
.feature__body strong { color: #fff; font-weight: 700; }

/* Principles */
.principle {
  position: relative;
  padding: 32px 32px 32px 36px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow: hidden;
}
.principle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 32px;
  bottom: 32px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--grad);
}
.principle p { color: var(--ink-soft); font-size: 15px; }

.nav__links a.is-active { color: var(--blue); font-weight: 700; }

/* Shared bits */
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}
.avatar--lg { width: 56px; height: 56px; font-size: 20px; background: var(--grad); color: #fff; }
.avatar--blue { background: var(--grad); color: #fff; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  background: #eef0f4;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge--blue { background: var(--blue-tint); color: var(--blue); }
.badge--line { background: #fff; border: 1px solid var(--line); }

.link-more { font-size: 14px; font-weight: 600; color: var(--blue); }
.link-more:hover { text-decoration: underline; }

.btn--sm { padding: 10px 18px; font-size: 14px; border-radius: 10px; }

/* Organization */
.org { display: flex; flex-direction: column; align-items: center; }
.org__head { display: flex; justify-content: center; }
.person {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px 16px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 40, 90, 0.08);
}
.person__role { font-size: 13px; font-weight: 600; color: var(--blue); line-height: 1.3; }
.person__name { font-size: 19px; font-weight: 800; line-height: 1.3; }
.org__line { width: 1px; height: 40px; background: var(--line); }
.org .grid { width: 100%; }

.team {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border-top: 3px solid var(--blue);
}
.team__tag { font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: 0.06em; margin-bottom: 6px; }
.team h3 { font-size: 18px; margin-bottom: 4px; }
.team__desc { font-size: 14px; color: var(--ink-soft); margin-bottom: 20px; }
.team__members { list-style: none; display: grid; gap: 10px; }
.team__members li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.team__members em { font-style: normal; font-weight: 400; font-size: 13px; color: var(--ink-soft); }
.team__members .avatar { background: #fff; }

.advisory {
  width: 100%;
  margin-top: 20px;
  padding: 20px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.advisory__title { font-size: 14px; font-weight: 700; }
.advisory__list { display: flex; gap: 8px; flex-wrap: wrap; }
.advisory__list span {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 14px;
  color: var(--ink-soft);
}

/* News (unused on home) */
.section__head--row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.news { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.news__col {
  padding: 28px 28px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.news__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}
.news__title h3 { margin: 0; }
.post-list { list-style: none; }
.post-list li + li { border-top: 1px solid var(--line); }
.post-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}
.post-list__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.post-list a:hover .post-list__title { color: var(--blue); }
.post-list time, .table time { font-size: 14px; color: var(--ink-soft); }

/* Board page */

.board { padding: 0 0 120px; }
.board__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
}
.tab:hover { background: var(--bg-soft); color: var(--ink); }
.tab.is-active { background: var(--ink); color: #fff; }

.search {
  display: flex;
  margin-left: auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.search select, .search input {
  border: none;
  outline: none;
  font: inherit;
  font-size: 14px;
  background: transparent;
  color: var(--ink);
}
.search select { padding: 0 8px 0 12px; height: 40px; border-right: 1px solid var(--line); }
.search input { padding: 0 14px; height: 40px; width: 200px; }
.search:focus-within { border-color: var(--blue); }

.board__count { margin: 24px 0 12px; font-size: 14px; color: var(--ink-soft); }
.board__count strong { color: var(--blue); }

.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
  padding: 14px 12px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
}
.table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  color: var(--ink-soft);
}
.table .col-title { text-align: left; color: var(--ink); }
.table th:nth-child(3) { text-align: left; }
.table .col-title a { font-weight: 500; }
.table .col-title a:hover { color: var(--blue); text-decoration: underline; }
.col-no { width: 72px; }
.col-cat { width: 80px; }
.col-author { width: 120px; }
.col-date { width: 120px; font-size: 14px; }
.col-view { width: 72px; font-size: 14px; }
.table tbody tr:hover { background: #fafbfd; }
.table tr.is-pinned { background: var(--bg-soft); }
.table tr.is-pinned .col-title a { font-weight: 700; }
.pin { font-size: 13px; font-weight: 700; color: var(--blue); }
.cmt { font-size: 13px; font-weight: 600; color: var(--blue); }
.file { font-size: 13px; }
.new {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  border-radius: 4px;
  background: #ff5a4e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  vertical-align: 2px;
}

.board__foot { position: relative; display: flex; justify-content: center; margin-top: 40px; }
.board__foot .board__write { position: absolute; top: 0; right: 0; }
.pagination { display: flex; justify-content: center; gap: 4px; }
.page {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
a.page:hover { background: var(--bg-soft); }
.page.is-active { background: var(--grad); color: #fff; }
.page--arrow { font-size: 18px; }
.page--gap { color: #b0b6c2; }

/* Post page */
.container--narrow { max-width: 800px; }
.post-page { padding: 56px 0 120px; }
.back { display: inline-block; font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 28px; }
.back:hover { color: var(--blue); }

.post__head { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.post__head h1 { font-size: clamp(26px, 4vw, 36px); margin: 14px 0 20px; }
.post__meta { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-soft); }
.post__author { font-weight: 700; color: var(--ink); }

.post__body { padding: 40px 0; font-size: 17px; line-height: 1.85; }
.post__body p { margin-bottom: 20px; }
.post__body h2 { font-size: 21px; margin: 36px 0 12px; }
.post__body ul { padding-left: 22px; margin-bottom: 20px; }
.post__body li { margin-bottom: 6px; }
.post__body li::marker { color: var(--blue); }

.callout {
  margin: 28px 0;
  padding: 20px 24px;
  border-radius: 14px;
  background: var(--blue-tint);
}
.callout p { margin: 0; }
.callout__title { font-size: 14px; font-weight: 700; color: var(--blue); }

.attach {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
}
.attach a { font-weight: 600; }
.attach a:hover { color: var(--blue); }
.attach__size { font-size: 13px; color: var(--ink-soft); }

.comments { margin-top: 64px; }
.comments h2 { font-size: 20px; margin-bottom: 20px; }
.comments h2 span { color: var(--blue); }
.comment-form {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.comment-form:focus-within { border-color: var(--blue); }
.comment-form textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.comment-form .btn { cursor: pointer; }

.comment-list { list-style: none; margin-top: 12px; }
.comment {
  display: flex;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.comment--reply { padding-left: 46px; }
.comment__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 14px; }
.comment__meta time { color: var(--ink-soft); font-size: 13px; }

.post-nav { margin-top: 48px; border-top: 2px solid var(--ink); }
.post-nav a {
  display: flex;
  gap: 24px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.post-nav a:hover { color: var(--blue); }
.post-nav span { width: 56px; flex-shrink: 0; font-size: 14px; font-weight: 600; color: var(--ink-soft); }

/* ===== Write ===== */
.write__head { padding-bottom: 28px; margin-bottom: 8px; border-bottom: 2px solid var(--ink); }
.write__head h1 { font-size: clamp(26px, 4vw, 34px); }
.write__row { display: flex; align-items: center; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.write__row[hidden] { display: none; }
.write__label { width: 56px; flex-shrink: 0; font-size: 14px; font-weight: 700; }
.seg-pick, .chip-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-pick { padding: 4px; border-radius: 12px; background: var(--bg-soft); }
.seg-pick input, .chip-pick input { position: absolute; opacity: 0; pointer-events: none; }
.seg-pick span, .chip-pick span { display: block; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: background 0.2s, color 0.2s, border-color 0.2s; }
.seg-pick span { padding: 8px 18px; border-radius: 9px; }
.seg-pick input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(15, 40, 90, 0.1); }
.chip-pick span { padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; }
.chip-pick span:hover { border-color: var(--blue); color: var(--blue); }
.chip-pick input:checked + span { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.seg-pick input:focus-visible + span, .chip-pick input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.write__title {
  width: 100%;
  margin: 12px 0 20px;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: none;
  font: inherit;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  color: var(--ink);
  transition: border-color 0.2s;
}
.write__title::placeholder { color: #b0b6c2; }
.write__title:focus { border-color: var(--blue); }

.editor { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; }
.editor:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22, 104, 227, 0.08); }
.editor__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.editor__bar button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #3b4150;
  cursor: pointer;
}
.editor__bar button:hover { background: #fff; color: var(--blue); }
.editor__bar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.editor__bar circle[r="1"] { fill: currentColor; stroke: none; }
.editor__sep { width: 1px; height: 18px; margin: 0 6px; background: var(--line); }
.editor__area {
  display: block;
  width: 100%;
  min-height: 380px;
  padding: 22px 24px;
  border: 0;
  outline: none;
  resize: vertical;
  font: inherit;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
}
.editor__area::placeholder { color: #a3aab8; }
.editor__foot { padding: 8px 16px; border-top: 1px solid var(--line); text-align: right; font-size: 12.5px; color: var(--ink-soft); }

.drop {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 22px 24px;
  border: 1.5px dashed #c9d3e3;
  border-radius: 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-soft);
  transition: border-color 0.2s, background 0.2s;
}
.drop:hover, .drop.is-over { border-color: var(--blue); background: var(--blue-tint); }
.drop input { position: absolute; opacity: 0; pointer-events: none; }
.drop svg { width: 28px; height: 28px; flex-shrink: 0; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.drop strong { display: block; margin-bottom: 2px; font-size: 14.5px; color: var(--ink); }
.drop__list { list-style: none; display: grid; gap: 6px; margin-top: 10px; }
.drop__list:empty { display: none; }
.drop__list li { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 600; }
.drop__list small { margin-left: auto; font-size: 12.5px; font-weight: 400; color: var(--ink-soft); }

.write__opts { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.write__note { font-size: 13px; color: var(--ink-soft); }
.write__actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.write__actions div { display: flex; gap: 8px; }
.write__actions .btn { justify-content: center; min-width: 96px; }

.notice-box {
  margin-bottom: 24px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--blue-tint);
  font-size: 13.5px;
  color: var(--blue-deep);
}
button.tab { border: 0; background: transparent; font-family: inherit; cursor: pointer; }

/* ===== Database ===== */
.db-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 40px; border: 1px solid var(--line); border-radius: 16px; }
.db-stats div { display: flex; flex-direction: column; gap: 2px; padding: 22px 24px; }
.db-stats div + div { border-left: 1px solid var(--line); }
.db-stats b { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--blue); }
.db-stats span { font-size: 13.5px; color: var(--ink-soft); }
.db-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.db-tools select { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); }
.db-tools .search { margin-left: 0; }
.db-table .db-id { width: 120px; }
.db-table td.db-id a { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.db-table td.db-id a:hover { color: var(--blue); }
.db-sex, .db-events { width: 72px; }
.db-time { width: 110px; font-variant-numeric: tabular-nums; }
.db-grade { width: 72px; }
.db-table tbody tr[hidden] { display: none; }
.db-none { color: #a3aab8; }
.db-empty { padding: 48px 0; text-align: center; color: var(--ink-soft); }
.db-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; font-size: 13px; color: var(--ink-soft); }
.db-legend li { display: flex; align-items: center; gap: 8px; }

.grade { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 13px; font-weight: 800; }
.grade--a { background: var(--grad); color: #fff; }
.grade--b { background: var(--blue-tint); color: var(--blue); }
.grade--c { border: 1px solid #c8d6ee; color: var(--blue-deep); }
.grade--x { background: var(--bg-soft); color: #8a919e; }

.db-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 2px solid var(--ink); }
.db-head h1 { font-size: clamp(30px, 4vw, 40px); font-variant-numeric: tabular-nums; }
.db-head__grade { display: flex; align-items: center; gap: 12px; }
.db-head__grade .grade { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; }
.db-head__grade > span:last-child { display: flex; flex-direction: column; font-size: 13px; color: var(--ink-soft); }
.db-head__grade b { font-size: 15px; color: var(--ink); }
.db-block { margin-top: 48px; }
.db-block h2 { margin-bottom: 16px; font-size: 20px; }
.db-block h2 span { color: var(--blue); }
.db-facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.db-facts div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.db-facts dt { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.db-facts dd { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.db-facts small { margin-left: 4px; font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.db-tip { margin-top: 14px; font-size: 13.5px; color: var(--ink-soft); }
.db-timeline { list-style: none; border-top: 1px solid var(--line); }
.db-timeline li { display: grid; grid-template-columns: 120px auto 1fr; align-items: center; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.db-timeline__year { font-weight: 700; font-variant-numeric: tabular-nums; }
.db-timeline__year small { margin-left: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); }
.db-block + .notice-box { margin-top: 40px; }

/* ===== Glossary ===== */
.gl-orig { font-family: "Noto Serif", Georgia, serif; font-style: italic; color: var(--blue); }
.arc-search {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 56px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.arc-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22, 104, 227, 0.08); }
.arc-search svg { width: 18px; height: 18px; margin: 0 4px 0 12px; flex-shrink: 0; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; }
.arc-search input { flex: 1; min-width: 0; height: 100%; padding: 0 10px; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; }
.arc-search .btn { height: 100%; padding: 0 24px; cursor: pointer; }
.gl-bar { margin-top: 28px; }
.gl-index { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 20px; }
.gl-index a, .gl-index span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-size: 14px; font-weight: 700; }
.gl-index a { background: var(--blue-tint); color: var(--blue); transition: background 0.2s, color 0.2s; }
.gl-index a:hover { background: var(--blue); color: #fff; }
.gl-index span { color: #c3c9d4; }
.gl-group { scroll-margin-top: calc(var(--nav-h, 81px) + 16px); }
.gl-group[hidden] { display: none; }
.gl-group h2 { margin-top: 32px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); font-size: 22px; }
.gl-list { list-style: none; }
.gl-list li[hidden] { display: none; }
.gl-item { display: block; padding: 20px 4px; border-bottom: 1px solid var(--line); }
.gl-item__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.gl-item strong { font-size: 18px; transition: color 0.2s; }
.gl-item:hover strong { color: var(--blue); }
.gl-item .gl-orig { font-size: 16px; }
.gl-en { font-size: 13.5px; color: var(--ink-soft); }
.gl-item .badge { align-self: center; margin-left: auto; }
.gl-item__def { display: -webkit-box; margin-top: 6px; overflow: hidden; font-size: 14.5px; color: var(--ink-soft); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.gl-head { padding-bottom: 28px; border-bottom: 2px solid var(--ink); }
.gl-head__meta { display: flex; gap: 6px; }
.gl-head h1 { margin: 16px 0 10px; font-size: clamp(34px, 5vw, 48px); }
.gl-head__orig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font-size: 14px; color: var(--ink-soft); }
.gl-head__orig .gl-orig { font-size: 24px; }
.gl-def { font-size: 17px; line-height: 1.85; }
.gl-alts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.gl-alts li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; }
.gl-source { font-family: "Noto Serif", Georgia, serif; font-style: italic; font-size: 16px; }
.gl-related { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.gl-related a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; transition: border-color 0.2s; }
.gl-related a:hover { border-color: var(--blue); }
.gl-related .gl-orig { font-size: 14px; }
.gl-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 48px; padding: 24px 28px; border-radius: 16px; background: var(--bg-soft); }
.gl-cta p { font-weight: 700; }

/* ===== Column ===== */
.col-list { border-top: 1px solid var(--ink); }
.col-item { display: flex; align-items: center; gap: 40px; padding: 28px 4px; border-bottom: 1px solid var(--line); }
.col-item__text { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; }
.col-item__cat { font-size: 13px; font-weight: 700; color: var(--blue); }
.col-item strong { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; transition: color 0.2s; }
.col-item:hover strong { color: var(--blue); }
.col-item__dek { font-size: 15px; color: var(--ink-soft); }
.col-item__meta { margin-top: 4px; font-size: 13px; color: #8a919e; }
.col-item img { width: 180px; aspect-ratio: 3 / 2; flex-shrink: 0; object-fit: cover; border-radius: 10px; }

.col-dek { margin: -8px 0 20px; font-size: 17px; color: var(--ink-soft); }
.col-figure { width: 100%; aspect-ratio: 16 / 9; margin-top: 32px; object-fit: cover; border-radius: 14px; }

.news__col { background: #fff; }
.section--tight { padding-top: 64px; }

.post__body blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--blue);
  color: var(--ink-soft);
  font-style: italic;
}
.data-table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: 15px;
}
.data-table th, .data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.data-table th { background: var(--bg-soft); font-weight: 700; font-size: 14px; }
.data-table td:first-child { font-weight: 600; }

/* About */
.greeting { max-width: 780px; }
.greeting__body h2 { margin-bottom: 32px; }

.greeting__body > p { color: #2f3540; margin-bottom: 20px; font-size: 17px; line-height: 1.9; }
.signature {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 40px;
}
.signature span { font-size: 15px; color: var(--ink-soft); }
.signature strong { font-size: 24px; font-weight: 800; letter-spacing: 0.1em; }

.facts { border-top: 2px solid var(--ink); }
.facts div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--line);
}
.facts dt { font-weight: 700; }
.facts dd { color: var(--ink-soft); }

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 64px;
  padding: 36px 40px;
  border-radius: var(--radius);
  background: var(--night);
  color: #fff;
}
.cta h3 { margin-bottom: 4px; }
.cta p { color: #aab6cc; font-size: 15px; }

/* Timeline */
.timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--blue-light), var(--blue-deep));
}
.timeline li { position: relative; padding-top: 36px; }
.timeline li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue);
}
.timeline li:last-child::before { background: var(--blue); }
.timeline__era { font-size: 13px; font-weight: 700; color: var(--blue); margin-bottom: 6px; }
.timeline h3 { font-size: 18px; }
.timeline li > p:not(.timeline__era) { font-size: 14px; color: var(--ink-soft); margin-bottom: 12px; }
.timeline__lang {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--bg-soft);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Data grades */
.grades { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.grades li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 14px;
}
.grades b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad);
  font-size: 13px;
}


/* ===== Buttons & misc ===== */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { border: none; background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(22, 104, 227, 0.28); }
.card__out {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px !important;
  font-weight: 600;
  color: var(--blue) !important;
}
.feature--photo {
  background:
    linear-gradient(90deg, rgba(11, 23, 48, 0.98) 40%, rgba(11, 23, 48, 0.88) 70%, rgba(11, 23, 48, 0.6)),
    url("assets/database.jpg") right center / auto 130% no-repeat,
    var(--night);
}

.board { padding-top: 40px; }

/* ===== Footer ===== */
.footer { background: var(--foot); color: #c9d1e0; font-size: 13px; }
.footer__main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-top: 28px;
  padding-bottom: 28px;
  max-width: 1240px;
}
.footer h4 { display: none; }
.footer__list { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer__list a { transition: color 0.2s; }
.footer__list a:hover { color: #fff; }
.footer__main > div:nth-child(2) { padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.footer__main > div:nth-child(2) a { color: #8794ab; }
.footer__brand { order: -1; margin-right: auto; }
.footer__brand .logo__mark { width: 30px; height: 30px; --mark-bg: transparent; --mark-gap: var(--foot); }
.footer__brand .logo__text { color: #fff; font-size: 15px; }
.footer__brand .logo__en { color: var(--blue-light); }
.footer__brand p { display: none; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer__bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 12px;
  max-width: 1240px;
  color: #7d8aa3;
}
.footer__info p + p { margin-top: 2px; }
.footer__links { display: flex; gap: 18px; }
.footer__links a { color: var(--blue-light); font-weight: 600; }
.footer__links a:hover { color: #fff; }

/* ===== Motion ===== */
html.js .reveal {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 0.9s var(--ease) var(--delay, 0ms), translate 0.9s var(--ease) var(--delay, 0ms);
}
html.js .reveal.is-in { opacity: 1; translate: 0 0; }

.timeline::before { transform-origin: left; transition: transform 1.6s var(--ease); }
html.js .timeline::before { transform: scaleX(0); }
html.js .timeline.is-in::before { transform: scaleX(1); }
.timeline li::before { transition: transform 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) calc(var(--delay, 0ms) + 300ms); }
html.js .timeline li::before { transform: scale(0); }
html.js .timeline li.is-in::before { transform: scale(1); }

.spotlight { position: relative; isolation: isolate; }
.spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(58, 160, 255, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.spotlight:hover::after { opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  body { padding-top: var(--nav-h, 69px); }
  .nav__inner { height: 68px; }
  .logo__mark { width: 36px; height: 36px; }
  .logo__text { font-size: 17px; }
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - var(--nav-h, 69px));
    overflow-y: auto;
    padding: 4px 24px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -20px rgba(15, 40, 90, 0.25);
    font-size: 16px;
    opacity: 0;
    visibility: hidden;
    translate: 0 -8px;
    transition: opacity 0.25s, translate 0.3s var(--ease), visibility 0s 0.3s;
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; translate: 0 0; transition: opacity 0.25s, translate 0.3s var(--ease); }
  .nav__links a { padding: 15px 2px; border-bottom: 1px solid var(--line); }
  .nav__links a:not(.nav__mizar)::after { display: none; }
  .nav__links a.is-active { font-weight: 700; }
  .nav__links a.nav__login { margin: 0; padding-left: 2px; border-left: 0; }
  .nav__links a.nav__mizar { align-self: flex-start; margin-top: 18px; padding: 6px 14px 6px 6px; border-bottom: 1px solid var(--line); }
  body.nav-open { overflow: hidden; }
  .nav__group { padding-top: 14px; border-bottom: 1px solid var(--line); }
  .nav__links a.nav__top { padding: 15px 2px; font-size: 16px; font-weight: 500; }
  .nav__links a.nav__top.is-active { font-weight: 700; }
  .nav__links .nav__group a.nav__top { padding: 0 2px; border: 0; background: none; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--blue); pointer-events: none; }
  .nav__links a.nav__top::after { display: none; }
  .nav__sub { position: static; display: grid; grid-template-columns: 1fr 1fr; min-width: 0; margin: 0; padding: 4px 0 8px; border: 0; border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; translate: none; transition: none; }
  .nav__group .nav__sub, .nav__group:hover .nav__sub, .nav__group:focus-within .nav__sub { opacity: 1; visibility: inherit; translate: none; transition: none; }
  .nav__sub::before { display: none; }
  .nav__links .nav__sub a { padding: 11px 2px; border: 0; border-radius: 0; font-size: 16px; }
  .nav__links .nav__sub a:hover, .nav__links .nav__sub a.is-active { background: none; }
  .nav__links a.nav__login { padding: 15px 2px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .intro__deco { width: 220px; height: 220px; left: -130px; opacity: 0.5; }
  .footer__brand { width: 100%; }
}

@media (max-width: 900px) {
  .grid--3, .grid--2, .feature__inner { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr 1fr; }
  .col-cat, .col-view { display: none; }
  .timeline { grid-template-columns: 1fr; gap: 28px; padding-left: 32px; }
  .timeline::before { top: 0; bottom: 0; left: 7px; right: auto; width: 2px; height: auto; background: linear-gradient(to bottom, var(--blue-light), var(--blue-deep)); transform-origin: top; }
  html.js .timeline::before { transform: scaleY(0); }
  html.js .timeline.is-in::before { transform: scaleY(1); }
  .timeline li { padding-top: 0; }
  .timeline li::before { left: -32px; top: 4px; }
  .auth { padding: 0 0 64px; background: #fff; }
  .auth__inner { grid-template-columns: 1fr; border-radius: 0; box-shadow: none; }
  .auth__aside { display: none; }
  .pipeline { grid-template-columns: 1fr; gap: 28px; }
  .pipeline::before { display: none; }
  .pipeline li:not(:last-child)::after { content: ""; position: absolute; left: 27px; top: 56px; bottom: -28px; width: 2px; background: var(--blue); opacity: 0.35; }
  .pipeline li { padding-left: 80px; min-height: 56px; }
  .pipeline__no { position: absolute; left: 0; top: 0; }
  .pipeline h3 { margin-top: 4px; }
  .topics { padding: 24px; }
  .topics ul { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .band { min-height: 320px; }
  .section { padding: 72px 0; }
  .intro { padding: 64px 0 48px; }
  .intro__text { text-align: left; }
  .intro__deco { display: none; }
  .tiles { gap: 10px; }
  .tile__label { font-size: 13px; padding: 12px 8px; }
  .grid--4 { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .board__foot { flex-direction: column-reverse; gap: 24px; }
  .board__foot .board__write { position: static; align-self: flex-end; }
  .db-stats { grid-template-columns: 1fr 1fr; }
  .db-stats div:nth-child(3) { border-left: 0; }
  .db-stats div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .db-stats b { font-size: 24px; }
  .db-tools, .db-tools select { width: 100%; }
  .db-tools select { flex: 1; width: auto; }
  .db-sex, .db-place, .db-events { display: none; }
  .db-head { flex-direction: column; align-items: flex-start; }
  .db-facts { grid-template-columns: 1fr; }
  .db-timeline li { grid-template-columns: auto 1fr; gap: 8px 12px; }
  .db-timeline li > span:last-child { grid-column: 1 / -1; }
  .col-item { gap: 16px; padding: 22px 0; }
  .col-item strong { font-size: 17px; }
  .col-item__dek { display: none; }
  .col-item img { width: 96px; border-radius: 8px; }
  .write__row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .editor__bar { padding: 6px; }
  .editor__bar button { width: 30px; height: 32px; }
  .editor__sep { margin: 0 3px; }
  .editor__area { min-height: 300px; padding: 18px; }
  .drop { padding: 18px; }
  .write__opts { flex-direction: column; align-items: flex-start; }
  .write__actions .btn { min-width: 0; padding: 12px 18px; }
  .search input { flex: 1; width: auto; }
  .col-no, .col-author { display: none; }
  .table td { padding: 14px 6px; }
  .col-date { width: 88px; font-size: 13px; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .cta { padding: 28px 24px; }
    .footer__main > div:nth-child(2) { padding-left: 0; border-left: 0; }
  .footer__bottom .container { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; translate: none; }
}
