/* 지오킷 (GeoKit) — styles.css
 * :root 토큰은 projects/geokit/DESIGN.md frontmatter 를 1:1 미러한다.
 * 기술·정밀 — 뉴트럴 캔버스 + 단일 틸/그린 시그니처. 모노스페이스 코드 블록이 주인공.
 * base :root = LIGHT(기술 도구의 맑은 종이). [data-theme="dark"] 오버라이드로 다크 지원.
 */

:root {
  /* colors — light (native) */
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #eef2f0;
  --ink: #15201d;
  --muted: #51635d;
  --faint: #8a9893;
  --line: #d7dedb;
  --accent: #0f9d7a;
  --accent-deep: #0a7d61;
  --accent-ink: #ffffff;
  --accent-soft: rgba(15,157,122,.10);
  --warn: #b9791f;
  --danger: #c94545;

  /* decor */
  --grad-bg-glow: radial-gradient(820px 520px at 92% -10%, rgba(15,157,122,.08) 0%, transparent 60%);
  --grad-accent: linear-gradient(140deg, var(--accent), var(--accent-deep));
  --grid: repeating-linear-gradient(0deg, transparent 0 23px, var(--line) 23px 24px);

  /* elevation */
  --shadow-sm: 0 1px 2px rgba(20,40,35,.04), 0 10px 30px -20px rgba(20,40,35,.18);
  --shadow-focus: 0 0 0 3px rgba(15,157,122,.22);

  /* typography */
  --font-display: "Space Grotesk", "Pretendard", system-ui, sans-serif;
  --font-body: Inter, "Pretendard", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;
  --fs-display: 40px; --fw-display: 600; --lh-display: 1.08;
  --fs-h1: 28px; --fw-h1: 600; --lh-h1: 1.2;
  --fs-h2: 20px; --fw-h2: 600; --lh-h2: 1.3;
  --fs-h3: 15px; --fw-h3: 600; --lh-h3: 1.35;
  --fs-label: 12px; --fw-label: 600; --lh-label: 1.2;
  --fs-body: 15px; --lh-body: 1.65;
  --fs-mono: 13px; --lh-mono: 1.6;

  /* spacing / radius */
  --sp-xs: 6px; --sp-sm: 10px; --sp-md: 16px; --sp-lg: 24px; --sp-xl: 40px;
  --r-sm: 8px; --r-base: 12px; --r-lg: 16px; --r-pill: 999px;

  /* motion */
  --t-base: 200ms; --t-slow: 380ms; --ease: cubic-bezier(.2,.8,.2,1);

  /* dimensions */
  --maxw: 920px;

  /* shared language switcher theme bridge */
  --i18n-switch-bg: var(--surface-2);
  --i18n-switch-border: var(--line);
  --i18n-switch-fg: var(--ink);
  --i18n-switch-active-bg: var(--accent-soft);
  --i18n-switch-active-fg: var(--accent);
  --i18n-switch-menu-bg: var(--surface);
  --i18n-switch-menu-border: var(--line);
  --i18n-switch-shadow: 0 12px 32px rgba(20,40,35,.14);
}
/* ===== 3-way theme (Light/Dark/System) — base :root above = native LIGHT. Dark override below. ===== */
:root[data-theme="dark"] {
  --bg: #0c1518;
  --surface: #121f23;
  --surface-2: #16262b;
  --ink: #e6eef0;
  --muted: #93a7ac;
  --faint: #5f7378;
  --line: #21323a;
  --accent: #2dd4a8;
  --accent-deep: #15a98e;
  --accent-ink: #04201b;
  --accent-soft: rgba(45,212,168,.12);
  --warn: #d8a23a;
  --danger: #e07070;
  --grad-bg-glow: radial-gradient(820px 520px at 92% -10%, rgba(45,212,168,.08) 0%, transparent 60%);
  --grid: repeating-linear-gradient(0deg, transparent 0 23px, var(--line) 23px 24px);
  --shadow-sm: 0 1px 0 rgba(255,255,255,.02), 0 10px 30px -18px rgba(0,0,0,.55);
  --shadow-focus: 0 0 0 3px rgba(45,212,168,.26);
  --i18n-switch-bg: rgba(45,212,168,.06);
  --i18n-switch-menu-bg: var(--surface);
  --i18n-switch-shadow: 0 12px 32px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  background-image: var(--grad-bg-glow);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(15,157,122,.22); color: var(--ink); }
a { color: var(--accent); }
button { font-family: inherit; }
h1,h2,h3 { margin: 0; font-family: var(--font-display); }
code, pre, .mono { font-family: var(--font-mono); }

/* ── header ─────────────────────────────────────────────── */
.site {
  display: flex; align-items: center; gap: var(--sp-md);
  max-width: var(--maxw); margin: 0 auto; padding: var(--sp-md) var(--sp-lg);
}
.brand { display: flex; align-items: center; gap: var(--sp-sm); margin-inline-end: auto; }
.brand-mark {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: var(--grad-accent); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  box-shadow: var(--shadow-sm);
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.brand-name b { color: var(--accent); font-weight: 700; }

/* ── layout ─────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--sp-lg); }
.block { padding-block: var(--sp-xl) var(--sp-lg); }
section + section.block { padding-top: var(--sp-lg); }

/* ── hero ───────────────────────────────────────────────── */
.hero { padding-block: var(--sp-xl) var(--sp-lg); }
.hero h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); max-width: 22ch; }
.hero .tagline { color: var(--muted); margin: var(--sp-sm) 0 0; font-size: var(--fs-body); max-width: 60ch; }
.hero .lede { color: var(--faint); margin: var(--sp-sm) 0 0; font-size: 13px; max-width: 64ch; }

/* ── cross-banner (aeo-radar 딥링크) ────────────────────── */
.crossbanner {
  display: flex; gap: var(--sp-md); align-items: flex-start;
  text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid var(--accent);
  border-radius: var(--r-base); padding: var(--sp-md) var(--sp-lg);
  box-shadow: var(--shadow-sm); transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.crossbanner:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -18px rgba(20,40,35,.28); }
.cross-ic {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: var(--r-pill);
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-mono); font-weight: 700; font-size: 15px;
}
.cross-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.cross-text { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.cross-cta { display: inline-block; margin-top: var(--sp-sm); color: var(--accent); font-weight: 600; font-size: 13.5px; }

/* ── section heads ──────────────────────────────────────── */
.section-head { margin-bottom: var(--sp-md); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-sm) var(--sp-md); }
.section-head .eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 600;
  color: var(--accent); letter-spacing: .06em; text-transform: uppercase;
}
.section-head h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); flex: 1 1 auto; }
.section-head .sub { color: var(--muted); font-size: 13.5px; max-width: 64ch; flex-basis: 100%; }
.section-head h3 { font-size: var(--fs-h3); }

.chip-privacy {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--accent); background: var(--accent-soft);
  padding: 4px 10px; border-radius: var(--r-pill); font-family: var(--font-mono);
}
.chip-privacy .lock { width: 13px; height: 13px; }

/* ── card / form ────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-lg); box-shadow: var(--shadow-sm);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md) var(--sp-lg); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-wide { grid-column: 1 / -1; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field-label.sm { font-size: 12px; color: var(--muted); font-weight: 600; }
.field-label .muted { color: var(--faint); font-weight: 400; font-size: 12px; margin-inline-start: 6px; }
.field-hint { font-size: 12px; color: var(--faint); }
input[type="text"], input[type="url"], textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  border-radius: var(--r-sm); padding: 9px 11px; font: inherit; font-size: 14px; transition: border var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
input::placeholder { color: var(--faint); }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus); }

/* URL rows */
.url-rows { display: flex; flex-direction: column; gap: var(--sp-sm); }
.url-row { display: grid; grid-template-columns: 1fr 1.3fr 1.4fr auto; gap: var(--sp-sm); align-items: center; }
.url-row input { padding: 7px 10px; font-size: 13px; }
.url-row .btn-x {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer;
  font-size: 16px; line-height: 1; transition: color var(--t-base), border-color var(--t-base);
}
.url-row .btn-x:hover { color: var(--danger); border-color: var(--danger); }
.btn-add { align-self: flex-start; margin-top: 2px; }

.policy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-sm); margin-top: var(--sp-xs); }
.persist { margin-inline-start: auto; font-size: 12px; color: var(--faint); font-family: var(--font-mono); }
.persist.is-on { color: var(--accent); }

/* ── buttons ────────────────────────────────────────────── */
.btn-primary, .btn-ghost {
  border-radius: var(--r-base); padding: 9px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-base) var(--ease), color var(--t-base);
}
.btn-primary { background: var(--grad-accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(15,157,122,.5); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }

/* ── tabs ───────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: var(--sp-md); overflow-x: auto; }
.tab {
  appearance: none; background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 10px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: color var(--t-base), border-color var(--t-base);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.panel { animation: fade var(--t-slow) var(--ease); }
.panel.hidden { display: none; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── code card / codeblock ──────────────────────────────── */
.note { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 12px; margin: var(--sp-sm) 0 var(--sp-md); }
.codecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.codecard-head { display: flex; align-items: center; gap: var(--sp-sm); padding: var(--sp-sm) var(--sp-md); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.codecard-head .filename { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.codecard-actions { margin-inline-start: auto; display: flex; gap: 6px; }
.chip-experimental {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--warn);
  background: rgba(185,121,31,.10); border: 1px solid rgba(185,121,31,.25);
  padding: 3px 9px; border-radius: var(--r-pill);
}
.codeblock {
  margin: 0; padding: var(--sp-md); font-family: var(--font-mono); font-size: var(--fs-mono); line-height: var(--lh-mono);
  color: var(--ink); background: var(--surface); white-space: pre-wrap; word-break: break-word; overflow-x: auto;
  min-height: 84px;
}
.codeblock .empty { color: var(--faint); font-family: var(--font-body); font-size: 13.5px; }

/* ── crawler table ──────────────────────────────────────── */
.card-section-head { margin-bottom: var(--sp-md); }
.card-section-head h3 { margin-bottom: 4px; }
.card-section-head .muted { font-size: 12.5px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.crawler-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.crawler-table th, .crawler-table td { text-align: start; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.crawler-table thead th { background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-family: var(--font-mono); }
.crawler-table tbody tr:last-child td { border-bottom: none; }
.crawler-table td.agent { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.crawler-table td.owner, .crawler-table td.purpose { color: var(--muted); font-size: 12.5px; }
.col-action { width: 132px; }
/* Mobile: drop the 560px min-width so the Allow/Block toggle column stays on-screen
   instead of being pushed off the right edge. Text columns wrap; toggle stays visible. */
@media (max-width: 640px) {
  .crawler-table { min-width: 0; }
  .crawler-table th, .crawler-table td { padding: 7px 6px; font-size: 12px; }
  .crawler-table td.owner, .crawler-table td.purpose { font-size: 11.5px; }
  .col-action { width: auto; white-space: nowrap; }
}
.toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track {
  width: 38px; height: 20px; border-radius: var(--r-pill); background: var(--surface-2);
  border: 1px solid var(--line); position: relative; transition: background var(--t-base) var(--ease);
}
.toggle .track::after {
  content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted); transition: transform var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.toggle input:checked + .track { background: var(--accent-soft); border-color: var(--accent); }
.toggle input:checked + .track::after { transform: translateX(18px); background: var(--accent); }
:root[data-theme="dark"] .toggle input:checked + .track::after { transform: translateX(18px); }
.toggle input:focus-visible + .track { box-shadow: var(--shadow-focus); }
.toggle .tlabel { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.toggle input:checked ~ .tlabel.allow { color: var(--accent); }
.toggle input:not(:checked) ~ .tlabel.allow { color: var(--faint); }

/* ── checklist ──────────────────────────────────────────── */
.check-summary-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); margin-bottom: var(--sp-md); padding-bottom: var(--sp-md); border-bottom: 1px solid var(--line); }
.check-summary-row strong { font-family: var(--font-mono); font-size: 18px; color: var(--accent); }
.check-summary-row .asof { font-size: 11.5px; color: var(--faint); font-family: var(--font-mono); }
.check-group { margin-bottom: var(--sp-md); }
.check-group-title { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.check-item { display: grid; grid-template-columns: auto 1fr auto; gap: var(--sp-md); align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.check-item:last-child { border-bottom: none; }
.check-item .ci-main { min-width: 0; }
.check-item .ci-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.check-item .ci-why { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.check-box {
  width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--surface-2);
  display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; transition: background var(--t-base), border-color var(--t-base);
}
.check-box::after { content: ""; width: 10px; height: 6px; border: 2px solid transparent; border-left: none; border-top: none; transform: rotate(45deg) scale(0); transition: transform var(--t-base) var(--ease); margin-top: -2px; }
.check-box.is-done { background: var(--accent); border-color: var(--accent); }
.check-box.is-done::after { border-color: var(--accent-ink); transform: rotate(45deg) scale(1); }
.check-status { font-family: var(--font-mono); font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; align-self: center; }
.check-status.is-done { color: var(--accent); }
.check-alldone { color: var(--accent); font-size: 13.5px; margin: var(--sp-md) 0 0; }
.hidden { display: none !important; }

/* ── ad slot ────────────────────────────────────────────── */
.ad-slot { margin: var(--sp-lg) auto; min-height: 0; display: none; }
.ad-slot.is-preview, .ad-slot.is-live { display: block; }
.ad-label { display: block; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.ad-ph { display: grid; place-items: center; min-height: 90px; border: 1px dashed var(--line); border-radius: var(--r-sm); color: var(--faint); font-size: 12px; }

/* ── misc text ──────────────────────────────────────────── */
.disclaimer { color: var(--muted); font-size: 13px; margin: var(--sp-lg) auto var(--sp-xl); }
.disclaimer b { color: var(--ink); }
.info { margin: 0 auto var(--sp-xl); }
.info h2 { font-size: var(--fs-h2); margin-top: var(--sp-xl); }
.info p { color: var(--muted); font-size: 14px; }
.faq { margin: 0; }
.faq dt { font-weight: 600; color: var(--ink); margin-top: var(--sp-md); font-size: 14px; }
.faq dd { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }

/* ── footer / toast ─────────────────────────────────────── */
.foot { max-width: var(--maxw); margin: 0 auto; padding: var(--sp-lg); border-top: 1px solid var(--line); }
.foot a { font-size: 13px; text-decoration: none; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-inline-start: 3px solid var(--accent);
  padding: 9px 16px; border-radius: var(--r-base); font-size: 13.5px; box-shadow: var(--shadow-sm);
  opacity: 0; pointer-events: none; transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease); z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── responsive ─────────────────────────────────────────── */
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .policy-grid { grid-template-columns: 1fr; }
  .url-row { grid-template-columns: 1fr; }
  .url-row .btn-x { justify-self: start; }
  .hero h1 { font-size: 24px; }
  .crawler-table { font-size: 12.5px; }
}

/* ── RTL(ar): 논리 속성으로 미러링 ───────────────────────── */
[dir="rtl"] .crossbanner { border-inline-start: 3px solid var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
