/* OsaSoft website - hand-authored stylesheet (Databricks-inspired enterprise layout).
   Tokens first, then base, components, sections, responsive. Light theme, locked. */

:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-alt: #F4F6F9;
  --bg-tint: #EAF1FA;
  --surface: #FFFFFF;
  --surface-2: #FAFBFD;
  --header-bg: rgba(255, 255, 255, 0.88);
  --ink: #0F1B2D;
  --ink-2: #2E3A4C;
  --muted: #5B6778;
  --muted-2: #8A94A3;
  --line: #E2E7EE;
  --line-strong: #CBD3DE;
  --accent: #2F63A8;
  --accent-hover: #26528C;
  --accent-ink: #1F4478;
  --accent-soft: #E6EEF8;
  --btn-primary: #2F63A8;
  --btn-primary-hover: #26528C;
  --btn-dark-hover: #22324A;
  --danger: #B4232A;
  --navy: #0B182B;
  --navy-2: #13253F;
  --navy-line: rgba(255, 255, 255, 0.12);
  --navy-text: #C9D3E0;
  --ok: #2E7D52;
  --ok-soft: #E4F3EA;
  --warn: #9A6A12;
  --warn-soft: #FBF1DC;
  --focus-ring: rgba(47, 99, 168, .16);
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='%232F63A8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --select-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235B6778' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(15, 27, 45, 0.04), 0 12px 40px rgba(15, 27, 45, 0.08);
  --font: "Geist", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1200px;
  --nav-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
/* Dark theme: system preference (unless the user picked light) or explicit choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0C1526; --bg-alt: #111C30; --bg-tint: #152640;
    --surface: #131F34; --surface-2: #0F1929; --header-bg: rgba(12, 21, 38, 0.86);
    --ink: #F1F5FA; --ink-2: #CBD5E1; --muted: #98A6B9; --muted-2: #6F7E93;
    --line: #22304A; --line-strong: #34465F;
    --accent: #86B1E6; --accent-hover: #A9C9F0; --accent-ink: #BFD7F4; --accent-soft: rgba(134, 177, 230, 0.16);
    --btn-primary: #3E76C2; --btn-primary-hover: #4F86D0; --btn-dark-hover: #D7E0EC;
    --danger: #F09595;
    --navy: #060C18; --navy-2: #0B1524;
    --ok: #7BD3A0; --ok-soft: rgba(46, 125, 82, 0.28); --warn: #E6BC6A; --warn-soft: rgba(154, 106, 18, 0.28);
    --focus-ring: rgba(134, 177, 230, .25);
    --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='%2386B1E6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --select-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2398A6B9' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C1526; --bg-alt: #111C30; --bg-tint: #152640;
  --surface: #131F34; --surface-2: #0F1929; --header-bg: rgba(12, 21, 38, 0.86);
  --ink: #F1F5FA; --ink-2: #CBD5E1; --muted: #98A6B9; --muted-2: #6F7E93;
  --line: #22304A; --line-strong: #34465F;
  --accent: #86B1E6; --accent-hover: #A9C9F0; --accent-ink: #BFD7F4; --accent-soft: rgba(134, 177, 230, 0.16);
  --btn-primary: #3E76C2; --btn-primary-hover: #4F86D0; --btn-dark-hover: #D7E0EC;
  --danger: #F09595;
  --navy: #060C18; --navy-2: #0B1524;
  --ok: #7BD3A0; --ok-soft: rgba(46, 125, 82, 0.28); --warn: #E6BC6A; --warn-soft: rgba(154, 106, 18, 0.28);
  --focus-ring: rgba(134, 177, 230, .25);
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='%2386B1E6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --select-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2398A6B9' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.45);
}
html[lang="zh-Hant"] { --font: "Noto Sans TC", "Geist", system-ui, -apple-system, "PingFang TC", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }

/* ---- Typography ------------------------------------------------------- */
.h1 { font-size: clamp(2.375rem, 1.6rem + 3vw, 3.75rem); line-height: 1.08; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; }
.h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
.h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; text-wrap: balance; }
.h4 { font-size: 1.0625rem; line-height: 1.35; font-weight: 600; }
html[lang="zh-Hant"] .h1 { letter-spacing: 0; line-height: 1.2; font-weight: 700; font-size: clamp(2.125rem, 1.4rem + 2.6vw, 3.25rem); }
html[lang="zh-Hant"] .h2 { letter-spacing: 0; line-height: 1.28; font-weight: 700; }
html[lang="zh-Hant"] .h3, html[lang="zh-Hant"] .h4 { letter-spacing: 0; }
.lead { font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.body { color: var(--muted); text-wrap: pretty; }
.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
html[lang="zh-Hant"] .eyebrow { letter-spacing: 0.2em; }
.accent { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

/* ---- Layout ------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding: 72px 0; }
.section-head { max-width: 40em; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .h2 + .body, .section-head .h2 + .lead { margin-top: 16px; }
.stack > * + * { margin-top: 12px; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9375rem; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--btn-primary); color: #fff; }
.btn--primary:hover { background: var(--btn-primary-hover); }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark:hover { background: var(--btn-dark-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--bg-alt); border-color: var(--muted-2); }
.btn--light { background: #fff; color: #0F1B2D; }
.btn--light:hover { background: #E9EEF5; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn--outline-light:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.6); }
.btn--sm { height: 38px; padding: 0 14px; font-size: 0.875rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.link::after { content: "→"; transition: transform .18s var(--ease); }
.link:hover::after { transform: translateX(3px); }

/* ---- Header ------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header .container { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; margin-right: 8px; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 6px; font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); transition: color .15s, background-color .15s; }
.nav a:hover { color: var(--ink); background: var(--bg-alt); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; align-items: center; height: 38px; padding: 0 10px; border-radius: 6px; font-size: 0.875rem; font-weight: 500; color: var(--muted); border: 1px solid transparent; }
.lang:hover { color: var(--ink); background: var(--bg-alt); }
.menu-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: var(--radius); }
.theme-toggle { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 6px; color: var(--muted); }
.theme-toggle:hover { color: var(--ink); background: var(--bg-alt); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.menu-toggle:hover { background: var(--bg-alt); }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: transform .2s var(--ease), background-color .2s; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); transition: transform .2s var(--ease), top .2s var(--ease); }
.menu-toggle span::before { top: -6px; } .menu-toggle span::after { top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
.mobile-menu { display: none; }

/* ---- Hero --------------------------------------------------------------- */
.hero { padding: 80px 0 88px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.hero-copy .lead { margin-top: 20px; }
.hero-copy .btn-row { margin-top: 32px; }
.hero-visual { position: relative; min-width: 0; }
.hero-visual::before {
  content: ""; position: absolute; inset: -32px -40px -32px 24px; z-index: -1; border-radius: 24px;
  background-image: radial-gradient(var(--line-strong) 1.2px, transparent 1.2px); background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(closest-side at 60% 50%, #000 40%, transparent 100%); mask-image: radial-gradient(closest-side at 60% 50%, #000 40%, transparent 100%);
}
.hero--page { padding: 72px 0 80px; }
.hero--text { padding: 88px 0 64px; }
.hero--text .container { display: block; }
.hero--text .hero-copy { max-width: 46em; }

/* ---- Product preview frame (real component preview, not an image) ------- */
.frame {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden; font-size: 0.8125rem; color: var(--ink-2); min-width: 0;
}
.frame-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.frame-bar .dots { display: flex; gap: 5px; }
.frame-bar .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); display: block; }
.frame-bar .title { font-weight: 600; color: var(--ink); }
.frame-bar .meta { margin-left: auto; color: var(--muted-2); font-size: 0.75rem; }
.frame-body { padding: 16px; }
.frame-grid { display: grid; grid-template-columns: 140px minmax(0, 1fr); }
.frame-side { border-right: 1px solid var(--line); background: var(--surface-2); padding: 14px 10px; }
.frame-side li { padding: 7px 10px; border-radius: 6px; color: var(--muted); }
.frame-side li.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(15,27,45,.06); }
.frame-side .lbl { font-size: 0.6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); padding: 0 10px 8px; }
.frame-main { padding: 16px; min-width: 0; }
.frame-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.frame-head strong { font-size: 1rem; color: var(--ink); }
.frame-head span { color: var(--muted-2); font-size: 0.75rem; margin-left: auto; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.stat small { display: block; font-size: 0.6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.stat b { display: block; font-size: 1.375rem; line-height: 1.2; color: var(--ink); font-weight: 600; margin-top: 4px; }
.row-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.row-list li + li { margin-top: 8px; }
.row-list .bar { width: 3px; height: 28px; border-radius: 2px; background: var(--accent); flex: none; }
.row-list .t { min-width: 0; }
.row-list .t b { display: block; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-list .t span { color: var(--muted-2); font-size: 0.75rem; }
.tag { margin-left: auto; flex: none; font-size: 0.6875rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); }
.tag--ok { background: var(--ok-soft); color: var(--ok); }
.tag--warn { background: var(--warn-soft); color: var(--warn); }
.tag--accent { background: var(--accent-soft); color: var(--accent-ink); }
.tag--dot::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.table-wrap { overflow-x: auto; }
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th { text-align: left; font-size: 0.6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.mini-table td:first-child { min-width: 8em; }
.mini-table td:last-child { white-space: nowrap; }
.hero .mini-table th:nth-child(3), .hero .mini-table td:nth-child(3), .panel .mini-table th:nth-child(3), .panel .mini-table td:nth-child(3) { display: none; }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table td b { color: var(--ink); font-weight: 600; }
.mini-table .mono { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kanban .col-h { font-size: 0.75rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; display: flex; justify-content: space-between; }
.kanban .col-h span { color: var(--muted-2); font-weight: 500; }
.card-sm { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface); }
.card-sm + .card-sm { margin-top: 8px; }
.card-sm .id { font-family: var(--mono); font-size: 0.6875rem; color: var(--muted-2); }
.card-sm b { display: block; color: var(--ink); font-weight: 600; margin: 3px 0 6px; line-height: 1.3; }
.card-sm .who { display: flex; gap: 6px; flex-wrap: wrap; }
.card-sm .who span { font-size: 0.6875rem; padding: 2px 7px; border-radius: 4px; background: var(--bg-alt); color: var(--muted); }
.card-sm .who span.ag { background: var(--accent-soft); color: var(--accent-ink); }
.flow { display: grid; gap: 10px; }
.flow li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.flow .idx { width: 36px; height: 36px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 600; font-size: 0.8125rem; }
.flow .t b { display: block; color: var(--ink); font-weight: 600; }
.flow .t span { color: var(--muted-2); font-size: 0.75rem; }
.frame--dark { background: var(--navy); border-color: rgba(255,255,255,.1); color: var(--navy-text); }
.frame--dark .frame-bar { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.frame--dark .frame-bar .title { color: #fff; }
.frame--dark .stat, .frame--dark .row-list li, .frame--dark .card-sm { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.frame--dark .stat b, .frame--dark .row-list .t b, .frame--dark .card-sm b, .frame--dark .frame-head strong, .frame--dark .mini-table td b { color: #fff; }
.frame--dark .mini-table th, .frame--dark .mini-table td { border-color: rgba(255,255,255,.1); }
.frame--dark .mini-table td { color: var(--navy-text); }

/* ---- App mockup: OsaHive board / OsaCortex console --------------------- */
.app { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; font-size: 0.8125rem; color: var(--ink-2); min-width: 0; }
.app-top { display: flex; align-items: center; gap: 20px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.app-top .name { font-weight: 700; color: var(--ink); font-size: 0.9375rem; }
.app-top .proj { color: var(--muted); }
.app-top .right { margin-left: auto; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
.app-top .proj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.app-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.app-btn--dark { background: var(--ink); color: var(--bg); }
.app-btn--ghost { border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); }
.app-btn--accent { background: var(--btn-primary); color: #fff; }
.app-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 420px; }
.app-side { border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; background: var(--surface); }
.app-side .side-title { font-weight: 700; color: var(--ink); font-size: 0.9375rem; padding: 4px 12px 18px; }
.app-side .lbl { font-size: 0.625rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); padding: 0 12px 10px; }
.app-side li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--muted); }
.app-side li i { width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 4px; opacity: .55; flex: none; }
.app-side li.on { background: var(--bg-alt); color: var(--ink); font-weight: 600; }
.app-side--accent li.on { background: var(--accent-soft); color: var(--accent-ink); }
.app-side .user { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 0.75rem; }
.app-side .user > span:last-child { min-width: 0; }
.app-side .user b { display: block; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-side .user small { color: var(--muted-2); font-size: 0.6875rem; }
.app-side .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 600; font-size: 0.75rem; flex: none; }
.app-main { padding: 22px 24px 24px; min-width: 0; background: var(--surface-2); }
.app-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.app-head strong { display: block; font-size: 1.25rem; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.app-head small { display: block; color: var(--muted-2); font-size: 0.75rem; margin-top: 2px; }
.app-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 0.75rem; color: var(--ink-2); }
.app .stat-row { gap: 14px; margin-bottom: 18px; }
.app .stat { background: var(--surface); padding: 14px 16px; }
.app .stat b { font-size: 1.625rem; }
.app .table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mini-table--roomy td { padding: 18px 12px; }
.mini-table--roomy th { padding: 10px 12px; }
.dot-ok::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 8px; vertical-align: 1px; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kcol { padding: 12px; border-radius: 10px; background: var(--bg-alt); min-height: 400px; }
.kcol--progress { background: var(--warn-soft); }
.kcol--review { background: var(--ok-soft); }
.kcol--done { background: var(--accent-soft); }
.kcol .col-h { display: flex; justify-content: space-between; font-size: 0.8125rem; font-weight: 600; color: var(--ink); margin: 2px 4px 12px; }
.kcol .col-h span { color: var(--muted); font-weight: 500; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; min-height: 132px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(15,27,45,.04); }
.kcard + .kcard { margin-top: 12px; }
.kcard .id { font-family: var(--mono); font-size: 0.6875rem; color: var(--muted-2); }
.kcard .ttl { display: block; margin-top: 6px; color: var(--ink); font-weight: 500; line-height: 1.4; }
.kcard .meta { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.6875rem; color: var(--muted); }
.kcard .who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard .who::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.kcard .who--agent::before { background: var(--accent); }
.kcard .pr { font-weight: 600; flex: none; }
.kcard .pr.p1 { color: var(--danger); }
.app--compact .app-body { grid-template-columns: 150px minmax(0, 1fr); min-height: 0; }
.app--compact .app-main { padding: 16px; }
.app--compact .app-head strong { font-size: 1.0625rem; }
.app--compact .stat b { font-size: 1.25rem; }
.app--compact .stat { padding: 10px 12px; }
.app--compact .mini-table--roomy td { padding: 12px 8px; font-size: 0.75rem; }
.app--compact .mini-table--roomy th { padding: 8px; }
.app--compact .app-side .side-title { padding-bottom: 12px; }
.demo-wide { padding: 0 0 88px; }
.hero--stack { padding-bottom: 40px; }

/* ---- Card grid (services / featured) ----------------------------------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
a.card:hover, .card--hover:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card .h3 { color: var(--ink); }
.card .body { font-size: 0.9375rem; flex: 1; }
.card .link { font-size: 0.9375rem; margin-top: 4px; }
.card--tint { background: var(--bg-tint); border-color: transparent; }
.card--navy { background: rgba(255,255,255,.04); border-color: var(--navy-line); color: var(--navy-text); }
.card--navy .h3 { color: #fff; }
.card--navy .body { color: var(--navy-text); }
.card--navy .link { color: #fff; }
.card-mark { width: 40px; height: 40px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 0.9375rem; margin-bottom: 4px; }
.card--navy .card-mark { background: rgba(255,255,255,.1); color: #fff; }

/* ---- Dark platform section (tabs) -------------------------------------- */
.section--navy { background: var(--navy); color: var(--navy-text); }
.section--navy .h2, .section--navy .h3 { color: #fff; }
.section--navy .body, .section--navy .lead { color: var(--navy-text); }
.section--navy .eyebrow { color: #8FB3E0; }
.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 32px 0 28px; }
.tab { height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 0.9375rem; color: var(--navy-text); background: rgba(255,255,255,.08); border: 1px solid transparent; transition: background-color .18s, color .18s; }
.tab:hover { background: rgba(255,255,255,.14); color: #fff; }
.tab[aria-selected="true"] { background: #fff; color: #0F1B2D; }
.panel { background: var(--bg-alt); color: var(--ink); border-radius: 16px; padding: 40px; display: grid; gap: 32px; }
.panel[hidden] { display: none; }
.panel .body { color: var(--muted); }
.section--navy .panel .h3 { color: var(--ink); }
.section--navy .panel .check li { color: var(--ink-2); }
.panel .h3 { font-size: 1.5rem; }
.panel .body { margin-top: 10px; max-width: 46em; }
.panel-copy { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: start; }
.panel-copy .btn-row { margin-top: 20px; }
.panel-demo { min-width: 0; }
.panel-copy .check { display: grid; gap: 10px; }
.check li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 0.9375rem; }
.check li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--accent-soft) var(--check-icon) center/contain no-repeat; }
.section--navy .check li { color: var(--navy-text); }

/* ---- Steps (approach) --------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; position: relative; counter-reset: step; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px; background: var(--line-strong); }
.step { position: relative; padding-top: 68px; counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0;
  width: 48px; height: 48px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-strong);
  display: grid; place-items: center; font-weight: 600; font-size: 0.9375rem; color: var(--accent); font-variant-numeric: tabular-nums;
}
.section--alt .step::before { background: var(--bg-alt); }
.step .h3 { margin-bottom: 8px; }
.step .body { font-size: 0.9375rem; }
.steps--vertical { grid-template-columns: 1fr; gap: 0; }
.steps--vertical::before { top: 0; bottom: 0; left: 23px; right: auto; width: 1px; height: auto; }
.steps--vertical .step { padding: 0 0 32px 72px; }
.steps--vertical .step:last-child { padding-bottom: 0; }

/* ---- Feature list (2-col with sticky preview) --------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.split--rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--rev > :first-child { order: 2; }
.split--center { align-items: center; }
.split .sticky { position: sticky; top: calc(var(--nav-h) + 32px); }
.feature-list { margin-top: 32px; }
.feature-list li { padding: 24px 0; border-top: 1px solid var(--line); }
.feature-list li:last-child { border-bottom: 1px solid var(--line); }
.feature-list .h4 { margin-bottom: 6px; }
.feature-list .body { font-size: 0.9375rem; }

/* ---- Case tiles --------------------------------------------------------- */
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.case-tile { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); min-width: 0; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease); }
.case-tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.case-tile .body { font-size: 0.9375rem; flex: 1; }
.case-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--bg-tint); margin-top: 8px; }
.case-strip small { display: block; font-size: 0.625rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; margin-bottom: 4px; }
.case-strip b { display: block; font-size: 0.8125rem; color: var(--ink); font-weight: 600; line-height: 1.35; }
.case-tile .link { font-size: 0.9375rem; margin-top: 8px; }

/* ---- Case detail (cases page) ----------------------------------------- */
.case { padding: 80px 0; border-top: 1px solid var(--line); }
.case-label { font-size: 0.875rem; font-weight: 600; color: var(--accent); margin-bottom: 12px; }
.case .lead { margin-top: 16px; font-size: 1.0625rem; color: var(--muted); }
.callout { margin-top: 28px; padding: 20px 24px; border-left: 3px solid var(--accent); background: var(--bg-alt); border-radius: 0 var(--radius) var(--radius) 0; }
.callout small { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }
.callout p { color: var(--ink-2); font-size: 0.9375rem; }
.case--full .split { grid-template-columns: 1fr; gap: 40px; }
.case--full .hero-copy { max-width: 46em; }

/* ---- FAQ ---------------------------------------------------------------- */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; align-items: start; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font-weight: 600; font-size: 1.0625rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--accent); }
.faq .body { padding: 0 0 22px; font-size: 0.9375rem; max-width: 60ch; }

/* ---- CTA band + footer (single dark block) ------------------------------ */
.cta { background: var(--navy); color: var(--navy-text); padding: 96px 0 72px; }
.cta .h2 { color: #fff; }
.cta .lead { color: var(--navy-text); margin-top: 16px; }
.cta .container { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.cta .btn-row { margin-top: 32px; }
.contact-cards { display: grid; gap: 12px; }
.contact-card { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border: 1px solid var(--navy-line); border-radius: var(--radius-lg); background: rgba(255,255,255,.03); transition: background-color .18s, border-color .18s; }
.contact-card:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.25); }
.contact-card b { color: #fff; font-size: 1rem; }
.contact-card span { font-size: 0.9375rem; }
.contact-card em { font-style: normal; color: #fff; font-weight: 500; margin-top: 6px; }
.footer { background: var(--navy); color: var(--navy-text); border-top: 1px solid var(--navy-line); padding: 56px 0 40px; font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 40px; }
.footer .brand { color: #fff; }
.footer-brand p { margin-top: 14px; max-width: 30em; color: var(--muted-2); font-size: 0.875rem; }
.footer h3 { color: #fff; font-size: 0.8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.footer li + li { margin-top: 10px; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--navy-line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 0.8125rem; color: var(--muted-2); }

/* ---- Modal / forms ------------------------------------------------------ */
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(11, 24, 43, .62); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; overscroll-behavior: contain; padding: 48px 16px; opacity: 0; transition: opacity .18s var(--ease); }
.scrim.open { opacity: 1; }
.modal { position: relative; width: 100%; max-width: 600px; background: var(--surface); border-radius: 16px; padding: 32px; box-shadow: 0 24px 80px rgba(11,24,43,.35); transform: translateY(10px); transition: transform .18s var(--ease); }
.scrim.open .modal { transform: none; }
.modal .eyebrow { margin-bottom: 10px; }
.modal h2 { font-size: 1.625rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 10px; }
.modal .desc { color: var(--muted); font-size: 0.9375rem; margin-bottom: 24px; max-width: 46em; }
.modal-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); background: var(--bg-alt); }
.modal-close:hover { background: var(--line); color: var(--ink); }
.form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  min-height: 44px; padding: 10px 12px; font: inherit; font-size: 0.9375rem; color: var(--ink); appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field select { background: var(--surface) var(--select-icon) no-repeat right 12px center; padding-right: 32px; color: var(--ink); }
.field select:invalid { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field .err { display: none; color: var(--danger); font-size: 0.8125rem; }
.field.invalid .err { display: block; }
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.option { position: relative; display: block; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.option .t { font-weight: 600; font-size: 0.875rem; color: var(--ink); }
.option .c { font-size: 0.75rem; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.form .btn { width: 100%; height: 48px; margin-top: 4px; }
.form .btn[disabled] { opacity: .6; cursor: default; }
.form-error { display: none; color: var(--danger); font-size: 0.875rem; margin-top: 12px; text-align: center; }
.form-error.show { display: block; }
.privacy { color: var(--muted-2); font-size: 0.75rem; text-align: center; margin-top: 14px; line-height: 1.5; }
.direct { color: var(--muted); font-size: 0.8125rem; text-align: center; margin-top: 10px; }
.direct a { color: var(--accent); font-weight: 600; }
.success { text-align: center; padding: 48px 16px 32px; }
.success .mark { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 22px; }
.success h3 { font-size: 1.375rem; font-weight: 600; margin-bottom: 8px; }
.success p { color: var(--muted); }

/* ---- Motion (entry only, reduced-motion aware) -------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .hero-visual { animation: rise .7s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; }
  .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .hero-copy > :nth-child(4) { animation-delay: .18s; }
  .hero-visual { animation-delay: .15s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .steps::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: span 3; }
  .panel { padding: 28px; }
  .panel-copy { grid-template-columns: 1fr; gap: 20px; }
  .split, .faq, .cta .container { grid-template-columns: 1fr; gap: 40px; }
  .split--rev > :first-child { order: 0; }
  .split .sticky { position: static; }
  .cases { grid-template-columns: 1fr; }
  .app-body { grid-template-columns: 160px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .nav, .header-actions .btn, .header-actions .lang { display: none; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .mobile-menu { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 49; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; padding: 16px 24px 40px; }
  .mobile-menu.open { display: block; }
  .mobile-menu a, .mobile-menu button.item { display: block; width: 100%; text-align: left; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.125rem; font-weight: 500; color: var(--ink); }
  .mobile-menu .btn-row { margin-top: 24px; }
  .mobile-menu .btn-row .btn { flex: 1; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 56px 0 64px; }
  .hero-visual::before { inset: -24px -24px -24px 24px; }
  .section { padding: 72px 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .frame-grid { grid-template-columns: 1fr; }
  .frame-side { display: none; }
  .app-body, .app--compact .app-body { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .app-main { padding: 16px; }
  .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kcol { min-height: 0; }
  .demo-wide { padding-bottom: 64px; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 56px 0; }
  .hero { padding: 40px 0 56px; }
  .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .stat-row { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .stat b { font-size: 1.125rem; }
  .kanban { grid-template-columns: 1fr; }
  .kanban > .kcol:nth-child(n+3) { display: none; }
  .app-head { flex-direction: column; }
  .app-top { padding: 12px 16px; gap: 12px; }
  .app-top .proj, .app-top .right .num { display: none; }
  .app-head .actions { margin-left: 0; justify-content: flex-start; }
  .form .grid2 { grid-template-columns: 1fr; }
  .options { grid-template-columns: 1fr; }
  .modal { padding: 24px 20px; }
  .scrim { padding: 24px 12px; }
  .btn-row .btn { flex: 1 1 auto; }
  .cta { padding: 64px 0 56px; }
  .case { padding: 56px 0; }
  .mini-table th:nth-child(3), .mini-table td:nth-child(3) { display: none; }
}
