/* ──────────────────────────────────────────────────────────────────────
   ArokaGO V3 — Design Gallery shared stylesheet
   Generated by /design-consultation 2026-05-09
   Tokens mirror /DESIGN.md frontmatter. Modify there first; reflect here.
   ────────────────────────────────────────────────────────────────────── */

:root {
  /* Brand voltage */
  --c-primary: #3fbdbd;
  --c-primary-deep: #006a6a;
  --c-primary-active: #005757;
  --c-primary-disabled: #c4e9e9;
  --c-primary-soft: #e6f6f6;
  --c-trust: #c8a86d;
  --c-trust-deep: #745a27;
  --c-trust-soft: #f5ecd9;
  --c-authority: #535f74;

  /* Surface — Airbnb-aligned: pure white canvas, gray-on-gray fills */
  --c-canvas: #ffffff;
  --c-surface: #ffffff;
  --c-surface-soft: #f7f7f7;
  --c-surface-strong: #f2f2f2;
  --c-surface-strongest: #ebebeb;

  /* Ink */
  --c-ink: #1a1f2e;
  --c-body: #3a4256;
  --c-muted: #6b7488;
  --c-muted-soft: #97a0b2;

  /* Borders — Aroka brand-cohesive cool tint (matches navy ink #1a1f2e + body #3a4256) */
  --c-hairline: #dde2eb;
  --c-hairline-soft: #ebeef3;
  --c-border-strong: #b8c0d0;

  /* Semantic */
  --c-success: #2c8a5a;
  --c-success-soft: #e0f1e7;
  --c-warning: #c8861f;
  --c-warning-soft: #faecd1;
  --c-error: #c64545;
  --c-error-soft: #fae0e0;
  --c-info: #4d7ec8;
  --c-info-soft: #e1ebf7;
  --c-on-primary: #ffffff;
  --c-on-trust: #1a1f2e;

  /* Typography */
  --font-display: "Manrope", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", "Noto Sans Arabic", system-ui, sans-serif;
  --font-body: "Geist", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", "Noto Sans Arabic", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radius */
  --r-xs: 4px; --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 32px; --r-full: 9999px;

  /* Spacing */
  --s-xxs: 2px; --s-xs: 4px; --s-sm: 8px; --s-md: 12px; --s-base: 16px;
  --s-lg: 24px; --s-xl: 32px; --s-xxl: 48px; --s-section: 64px;

  /* Elevation — single tier (Airbnb pattern): cards rest flat with hairline only,
     lift on hover/dropdown via shadow-elevation. Modal scrim is its own tier. */
  --shadow-elevation: 0 0 0 1px rgba(26, 31, 46, 0.02), 0 2px 6px rgba(26, 31, 46, 0.04), 0 4px 8px rgba(26, 31, 46, 0.10);
  --shadow-modal: 0 16px 32px rgba(26, 31, 46, 0.16), 0 4px 12px rgba(26, 31, 46, 0.08);
}

[data-theme="dark"] {
  --c-canvas: #0f1419;
  --c-surface: #1a2030;
  --c-surface-soft: #1a2030;
  --c-surface-strong: #232a3d;
  --c-surface-strongest: #2d3550;
  --c-ink: #e8eaef;
  --c-body: #c4cad7;
  --c-muted: #97a0b2;
  --c-hairline: #2d3550;
  --c-hairline-soft: #1f2638;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-body);
  background: var(--c-canvas);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--c-ink); }
a { color: var(--c-primary-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { font-family: var(--font-mono); font-size: 12px; background: var(--c-surface-strong); padding: 2px 6px; border-radius: var(--r-xs); color: var(--c-ink); }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); border: none; cursor: pointer; background: none; }

/* ─── Gallery shell ─── */
.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
.gallery-nav {
  background: var(--c-surface);
  border-right: 1px solid var(--c-hairline);
  padding: var(--s-lg);
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.gallery-nav-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: var(--s-xs);
  display: flex; align-items: baseline; gap: 4px;
}
.gallery-nav-brand .go { color: var(--c-primary); font-family: var(--font-body); font-weight: 700; }
.gallery-nav-tag {
  font-size: 11px; font-weight: 600; color: var(--c-muted);
  margin-bottom: var(--s-lg); letter-spacing: 0.5px; text-transform: uppercase;
}
.gallery-nav-section {
  font-family: var(--font-body); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--c-muted);
  padding: var(--s-md) 0 var(--s-xs);
}
.gallery-nav-link {
  display: block; padding: 6px var(--s-sm);
  color: var(--c-body); font-size: 13px; border-radius: var(--r-xs);
}
.gallery-nav-link:hover { background: var(--c-surface-soft); text-decoration: none; }
.gallery-nav-link.current {
  background: var(--c-primary-soft); color: var(--c-primary-deep); font-weight: 600;
}
.gallery-nav-link.cross {
  display: flex; align-items: center; gap: 8px; font-weight: 600;
  padding: 8px var(--s-sm); color: var(--c-ink);
  border: 1px solid var(--c-hairline); margin-bottom: 4px;
}

/* Interactive affordance for data-go elements (rows, cards, list items)
   that aren't already buttons/anchors. Buttons + anchors already show pointer. */
[data-go]:not(button):not(a) { cursor: pointer; transition: background 150ms; }
[data-go]:not(button):not(a):hover { background: var(--c-surface-soft); }
.t-row.body[data-go]:hover { background: var(--c-primary-soft); }
.sidebar-item[data-go]:hover:not(.active) { background: var(--c-surface-strong); }
.gallery-content { padding: var(--s-xxl) var(--s-xxl); max-width: 1480px; }
.section { margin-bottom: var(--s-section); scroll-margin-top: var(--s-lg); }
.section-header { margin-bottom: var(--s-lg); padding-bottom: var(--s-md); border-bottom: 1px solid var(--c-hairline); }
.section-h { font-size: 28px; font-weight: 700; color: var(--c-ink); }
.section-d { font-size: 14px; color: var(--c-muted); margin-top: var(--s-xs); }

/* ─── Token preview ─── */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s-md); }
.swatch { background: var(--c-surface); border: 1px solid var(--c-hairline); border-radius: var(--r-sm); overflow: hidden; }
.swatch-color { height: 64px; }
.swatch-meta { padding: var(--s-sm) var(--s-md); font-size: 12px; }
.swatch-name { font-weight: 600; color: var(--c-ink); }
.swatch-hex { font-family: var(--font-mono); color: var(--c-muted); }
.type-row { display: grid; grid-template-columns: 180px 1fr; padding: var(--s-md) 0; border-bottom: 1px solid var(--c-hairline-soft); align-items: baseline; }
.type-row:last-child { border-bottom: none; }
.type-token { font-family: var(--font-mono); font-size: 12px; color: var(--c-muted); }
.type-sample { color: var(--c-ink); }
.scale-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: var(--s-md); align-items: end; }
.scale-cell { text-align: center; }
.scale-bar { background: var(--c-primary); border-radius: var(--r-xs); }
.scale-label { font-family: var(--font-mono); font-size: 11px; color: var(--c-muted); margin-top: var(--s-xs); }

/* ─── Frame chrome ─── */
.frame {
  background: var(--c-surface);
  border: 1px solid var(--c-hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--s-xl);
}
.frame-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-md) var(--s-base);
  background: var(--c-surface-soft);
  border-bottom: 1px solid var(--c-hairline);
}
.frame-id { font-family: var(--font-mono); font-size: 12px; color: var(--c-muted); }
.frame-title { font-size: 14px; font-weight: 600; color: var(--c-ink); }
.frame-tag {
  display: inline-block;
  background: var(--c-primary-soft); color: var(--c-primary-deep);
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: var(--r-full);
}
.frame-tag.app { background: var(--c-info-soft); color: var(--c-info); }
.frame-tag.admin { background: var(--c-trust-soft); color: var(--c-trust-deep); }
.frame-tag.public { background: var(--c-success-soft); color: var(--c-success); }
.frame-body { background: var(--c-canvas); }
.frame-body[data-mode="app"] { background: var(--c-surface-soft); }
.frame-body[data-mode="mobile"] {
  background: var(--c-canvas);
  display: flex; justify-content: center; padding: 24px;
}
.frame-body[data-mode="mobile"] .device {
  width: 375px; min-height: 700px;
  background: var(--c-canvas);
  border-radius: 36px;
  border: 1px solid var(--c-hairline);
  overflow: hidden;
  box-shadow: var(--shadow-elevation);
}

/* ─── Buttons ─── */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 20px; border-radius: var(--r-sm); font-size: 16px; font-weight: 500; transition: background 200ms; line-height: 1; cursor: pointer; }
.btn-primary { background: var(--c-primary); color: var(--c-on-primary); }
.btn-primary:hover { background: var(--c-primary-deep); }
.btn-secondary { background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-hairline); }
.btn-secondary:hover { background: var(--c-surface-soft); border-color: var(--c-border-strong); }
.btn-tertiary { background: transparent; color: var(--c-ink); padding: 0 12px; }
.btn-tertiary:hover { background: var(--c-surface-soft); }
.btn-trust { background: var(--c-trust); color: var(--c-on-trust); }
.btn-trust:hover { background: var(--c-trust-deep); color: white; }
.btn-danger { background: var(--c-error); color: white; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 17px; }

/* ─── Badges ─── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; line-height: 1; }
.badge-verified { background: var(--c-primary-soft); color: var(--c-primary-deep); }
.badge-trust { background: var(--c-trust-soft); color: var(--c-trust-deep); }
.badge-success { background: var(--c-success-soft); color: var(--c-success); }
.badge-warning { background: var(--c-warning-soft); color: var(--c-warning); }
.badge-error { background: var(--c-error-soft); color: var(--c-error); }
.badge-info { background: var(--c-info-soft); color: var(--c-info); }
.badge-neutral { background: var(--c-surface-strong); color: var(--c-body); }
.tag-uppercase { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 2px 8px; border-radius: var(--r-full); border: 1px solid var(--c-hairline); color: var(--c-ink); background: var(--c-surface); }

/* ─── Top nav ─── */
.topnav {
  height: 72px; background: var(--c-canvas); border-bottom: 1px solid var(--c-hairline-soft);
  display: flex; align-items: center; justify-content: space-between; padding: 0 32px;
}
.logomark { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--c-ink); display: flex; align-items: baseline; gap: 4px; }
.logomark .go { color: var(--c-primary); font-family: var(--font-body); font-weight: 700; }
.topnav-tabs { display: flex; gap: 4px; align-items: center; }
.topnav-tab { padding: 8px 12px; font-size: 15px; font-weight: 500; color: var(--c-body); border-radius: var(--r-xs); cursor: pointer; }
.topnav-tab.active { color: var(--c-ink); font-weight: 600; }
.topnav-tab:hover { background: var(--c-surface-soft); }
.topnav-utils { display: flex; gap: 8px; align-items: center; }

/* ─── Sidebar ─── */
.sidebar {
  width: 240px; background: var(--c-surface-soft); border-right: 1px solid var(--c-hairline-soft);
  padding: 16px; display: flex; flex-direction: column; gap: 4px;
}
.sidebar-section { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--c-muted); padding: 12px 12px 4px; }
.sidebar-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: var(--r-sm); color: var(--c-body); font-size: 14px; cursor: pointer; }
.sidebar-item.active { background: var(--c-surface); color: var(--c-ink); font-weight: 600; box-shadow: var(--shadow-elevation); }
.sidebar-item:hover:not(.active) { background: var(--c-surface-strong); }

/* ─── Provider card ─── */
.pcard { background: var(--c-surface); border: 1px solid var(--c-hairline); border-radius: var(--r-md); overflow: hidden; transition: all 200ms; cursor: pointer; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-elevation); }
.pcard-photo { aspect-ratio: 4 / 3; position: relative; background: linear-gradient(135deg, #d8eef0, #f5e8c5); }
.pcard-photo .badge-pos-tl { position: absolute; top: 12px; left: 12px; }
.pcard-photo .save { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: var(--r-full); background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.pcard-meta { padding: 12px 16px 16px; }
.pcard-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--c-ink); }
.pcard-sub { font-size: 14px; color: var(--c-muted); margin-top: 2px; }
.pcard-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.pcard-rating { font-size: 14px; color: var(--c-ink); }
.pcard-price { font-size: 15px; font-weight: 600; color: var(--c-ink); }

/* ─── Search bar pill ─── */
.searchpill { background: var(--c-surface); border: 1px solid var(--c-hairline); border-radius: var(--r-full); height: 56px; display: flex; align-items: stretch; padding: 4px; box-shadow: var(--shadow-elevation); max-width: 720px; margin: 0 auto; }
.searchpill-segment { flex: 1; padding: 6px 16px; cursor: pointer; border-radius: var(--r-full); display: flex; flex-direction: column; justify-content: center; }
.searchpill-segment:not(:last-child) { border-right: 1px solid var(--c-hairline); }
.searchpill-segment:hover { background: var(--c-surface-soft); }
.searchpill-label { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--c-ink); }
.searchpill-value { font-size: 13px; color: var(--c-muted); margin-top: 2px; }
.searchorb { width: 44px; height: 44px; border-radius: var(--r-full); background: var(--c-primary); color: var(--c-on-primary); display: flex; align-items: center; justify-content: center; align-self: center; font-size: 18px; cursor: pointer; }
.searchorb:hover { background: var(--c-primary-deep); }

/* ─── Generic helpers ─── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container.app { max-width: 1440px; padding: 0 24px; }
.container.tight { max-width: 720px; padding: 0 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stack-md > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 24px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.muted { color: var(--c-muted); }
.ink { color: var(--c-ink); }
.body { color: var(--c-body); }
.tertiary { color: var(--c-trust-deep); }
.display-xl { font-family: var(--font-display); font-size: 48px; font-weight: 600; line-height: 1.15; letter-spacing: -1.5px; color: var(--c-ink); }
.display-lg { font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.2; letter-spacing: -1px; color: var(--c-ink); }
.display-md { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: -0.5px; color: var(--c-ink); }
.display-sm { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -0.3px; color: var(--c-ink); }
.title-md { font-family: var(--font-body); font-size: 18px; font-weight: 600; color: var(--c-ink); }
.title-sm { font-family: var(--font-body); font-size: 16px; font-weight: 600; color: var(--c-ink); }
.body-sm { font-size: 13px; }
.body-md { font-size: 16px; }
.star { color: var(--c-ink); }
.kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; background: var(--c-surface-strong); border: 1px solid var(--c-hairline); border-radius: var(--r-xs); color: var(--c-muted); }

/* ─── Tables ─── */
.table-shell { background: var(--c-surface); border: 1px solid var(--c-hairline); border-radius: var(--r-md); overflow: hidden; }
.t-row { display: grid; padding: 0 16px; border-bottom: 1px solid var(--c-hairline-soft); height: 44px; align-items: center; }
.t-row:last-child { border-bottom: none; }
.t-row.head { height: 40px; background: var(--c-surface-soft); border-bottom: 1px solid var(--c-hairline); font-size: 12px; font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.t-row.body { font-size: 13px; color: var(--c-body); font-feature-settings: 'tnum'; }
.t-row.body:hover { background: var(--c-surface-soft); }
.t-num { text-align: right; font-feature-settings: 'tnum'; }

/* ─── Form input ─── */
.input { background: var(--c-surface); border: 1px solid var(--c-hairline); border-radius: var(--r-sm); height: 44px; padding: 0 14px; font-size: 16px; color: var(--c-ink); width: 100%; font-family: var(--font-body); }
.input:focus { outline: none; border: 2px solid var(--c-ink); padding: 0 13px; }
.input-label { font-size: 13px; font-weight: 500; color: var(--c-body); margin-bottom: 4px; display: block; }
.input-sm { height: 36px; font-size: 14px; }

/* ─── Hero cinematic ─── */
.hero-photo { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #006a6a 0%, #3fbdbd 50%, #c8a86d 100%); position: relative; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(26,31,46,0.5), transparent 50%); }

/* ─── AI search specific ─── */
.ai-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-full);
  background: var(--c-primary-soft); color: var(--c-primary-deep);
  font-size: 11px; font-weight: 600;
}
.ai-citation {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: var(--r-full);
  background: var(--c-primary); color: white;
  font-size: 10px; font-weight: 700;
  vertical-align: super; margin-left: 2px; cursor: pointer;
}
.ai-reasoning {
  background: var(--c-primary-soft); border-left: 3px solid var(--c-primary);
  padding: 12px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 14px; color: var(--c-body);
}

/* ─── Nav cards (for index hub) ─── */
.section-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-top: 24px;
}
.section-card {
  display: block;
  background: var(--c-surface); border: 1px solid var(--c-hairline);
  border-radius: var(--r-md); padding: 24px;
  transition: all 200ms;
  text-decoration: none; color: inherit;
}
.section-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-primary);
  box-shadow: var(--shadow-elevation);
  text-decoration: none;
}
.section-card-tag {
  display: inline-block;
  background: var(--c-primary-soft); color: var(--c-primary-deep);
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; padding: 2px 8px; border-radius: var(--r-full);
}
.section-card-tag.admin { background: var(--c-trust-soft); color: var(--c-trust-deep); }
.section-card-tag.app { background: var(--c-info-soft); color: var(--c-info); }
.section-card-tag.mobile { background: var(--c-warning-soft); color: var(--c-warning); }
.section-card-tag.states { background: var(--c-error-soft); color: var(--c-error); }
.section-card h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  margin-top: 12px; color: var(--c-ink);
}
.section-card p { font-size: 14px; color: var(--c-muted); margin-top: 8px; }
.section-card-screens {
  margin-top: 16px; font-size: 12px; color: var(--c-body);
  font-family: var(--font-mono);
}

/* ─── Mobile-specific ─── */
.mobile-nav-bottom {
  display: flex; justify-content: space-around; align-items: center;
  height: 64px; background: var(--c-surface);
  border-top: 1px solid var(--c-hairline);
  position: sticky; bottom: 0;
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; color: var(--c-muted); padding: 8px 12px;
}
.mobile-nav-item.active { color: var(--c-primary-deep); }

/* ─── Misc ─── */
.tab-strip {
  display: flex; gap: 24px; border-bottom: 1px solid var(--c-hairline);
}
.tab-strip a {
  padding: 12px 0; color: var(--c-muted); font-weight: 500; font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; text-decoration: none;
}
.tab-strip a:hover { color: var(--c-ink); text-decoration: none; }
.tab-strip a.active { color: var(--c-ink); font-weight: 600; border-bottom-color: var(--c-primary); }

.callout {
  background: var(--c-info-soft); border: 1px solid var(--c-info);
  border-radius: var(--r-md); padding: 16px;
  display: flex; gap: 12px; font-size: 14px; color: var(--c-body);
}
.callout-success { background: var(--c-success-soft); border-color: var(--c-success); }
.callout-warning { background: var(--c-warning-soft); border-color: var(--c-warning); }
.callout-trust { background: var(--c-trust-soft); border-color: var(--c-trust); }

.divider { height: 1px; background: var(--c-hairline-soft); margin: 24px 0; }

/* Subtle skeleton shimmer */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--c-surface-strong) 0%, var(--c-surface-strongest) 50%, var(--c-surface-strong) 100%);
  background-size: 800px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--r-xs);
  height: 14px;
}
