/* ==========================================================================
   Online Ruler — visual design layer
   Design reference: linear.app via opendesignmd.com/designs/linear-app
   Presentation only. No markup logic, no scripts, no content changes.
   ========================================================================== */

:root{
  --icon:#b8bcc6;
  --bg:#010102;
  --bg-elev:#0f1011;
  --bg-soft:#141516;
  --bg-card:#0f1011;
  --bg-card-hover:#191a1b;
  --bg-input:#141516;
  --border:#23252a;
  --border-strong:#34343a;
  --text:#f7f8f8;
  --text-muted:#8a8f98;
  --text-dim:#62666d;
  --accent:#5e6ad2;
  --accent-hover:#828fff;
  --accent-soft:rgba(94,106,210,.16);
  --ruler-bg:#0a0b0c;
  --tick:#e6e7e9;
  --ruler-text:#d0d6e0;
  --shadow:0 18px 50px rgba(0,0,0,.55);
  --guide:#828fff;
  --marker:#e5484d;
  --measure:#e5484d;
  --success:#27a644;
  --font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --topbar-h:56px;
}

html[data-theme="light"]{
  --icon:#24262b;
  --bg:#ffffff;
  --bg-elev:#ffffff;
  --bg-soft:#f5f6f6;
  --bg-card:#f6f7f7;
  --bg-card-hover:#eef0f1;
  --bg-input:#ffffff;
  --border:#e2e3e6;
  --border-strong:#c9cbd0;
  --text:#08090a;
  --text-muted:#5c5f66;
  --text-dim:#8a8f98;
  --accent:#5e6ad2;
  --accent-hover:#4f5bc4;
  --accent-soft:rgba(94,106,210,.1);
  --ruler-bg:#ffffff;
  --tick:#101113;
  --ruler-text:#24262b;
  --shadow:0 18px 44px rgba(20,22,26,.12);
  --guide:#5e6ad2;
  --marker:#d92d20;
  --measure:#d92d20;
  --success:#1f8f3a;
}

/* ---------- base ---------- */
html,body{
  background:var(--bg);
  color:var(--text);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  font-size:15px;
  line-height:1.5;
  letter-spacing:-.006em;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
::selection{background:rgba(94,106,210,.38);color:var(--text)}
*{scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent}
*::-webkit-scrollbar{width:8px;height:8px}
*::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:999px}
*::-webkit-scrollbar-track{background:transparent}
:focus-visible{outline:2px solid var(--accent-hover);outline-offset:2px}
a{-webkit-tap-highlight-color:transparent}

/* ==========================================================================
   MAIN APP — top bar
   ========================================================================== */
.topbar{
  background:rgba(1,1,2,.78);
  -webkit-backdrop-filter:blur(20px) saturate(170%);
  backdrop-filter:blur(20px) saturate(170%);
  border-bottom:1px solid var(--border);
  box-shadow:0 1px 0 rgba(255,255,255,.03) inset;
  padding:7px 12px;
  gap:6px;
  min-height:56px;
  align-content:center;
}
html[data-theme="light"] .topbar{background:rgba(255,255,255,.82)}
.brand{
  font-weight:600;
  font-size:13px;
  letter-spacing:-.01em;
  gap:7px;
  color:var(--text);
  border-radius:8px;
  padding:2px;
}
.brand:hover{background:var(--bg-card-hover)}
.brand-icon img{
  width:22px;height:22px;border-radius:6px;
  box-shadow:0 0 0 1px var(--border),0 2px 8px rgba(0,0,0,.35);
}
.seg{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:8px;
  padding:2px;
  gap:2px;
}
.seg button{
  border-radius:6px;
  padding:5px 10px;
  font-size:11px;
  font-weight:500;
  color:var(--text-muted);
  min-width:30px;
  transition:background .14s ease,color .14s ease,box-shadow .14s ease;
}
.seg button:hover{color:var(--text);background:var(--bg-card-hover)}
.seg button.active{
  background:var(--text);
  color:var(--bg);
  box-shadow:0 1px 2px rgba(0,0,0,.25);
}
.lang-select{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:8px;
  height:32px;
  padding:5px 8px;
  font-size:11px;
  color:var(--text-muted);
  max-width:92px;
  transition:border-color .14s ease,color .14s ease;
}
.lang-select:hover{border-color:var(--border-strong);color:var(--text)}
.lang-select:focus{border-color:var(--accent);outline:none}
.tool-group{display:contents}
.tbtn{width:40px;gap:2px}
.tbtn .ic{
  width:34px;height:34px;
  border-radius:8px;
  border:1px solid transparent;
  background:transparent;
  color:var(--icon);
  transition:background .14s ease,color .14s ease,border-color .14s ease,transform .1s ease;
}
.tbtn:hover .ic{
  background:var(--bg-card-hover);
  border-color:var(--border);
  color:var(--text);
}
.tbtn:active .ic{transform:scale(.94)}
.tbtn[aria-pressed="true"] .ic{
  background:var(--accent-soft);
  border-color:rgba(94,106,210,.5);
  color:var(--accent-hover);
}
.tbtn .cap{
  font-size:9px;
  font-weight:500;
  letter-spacing:.005em;
  color:var(--text-dim);
  transition:color .14s ease;
}
.tbtn:hover .cap{color:var(--text-muted)}
.tbtn[aria-pressed="true"] .cap{color:var(--accent-hover)}
.ppi-chip{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:7px;
  padding:5px 8px;
  font-family:var(--font-mono);
  font-size:9.5px;
  letter-spacing:.02em;
  color:var(--text-dim);
  gap:3px;
}
.ppi-chip .num{color:var(--accent-hover);font-weight:500}

/* ==========================================================================
   MAIN APP — landing / hero
   ========================================================================== */
.landing{
  position:relative;
  isolation:isolate;
  padding:clamp(26px,5vh,56px) 20px 30px;
  gap:clamp(12px,1.7vh,18px);
  overflow-y:auto;
}
.landing::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  pointer-events:none;
  background:
    radial-gradient(720px 420px at 50% -12%,rgba(94,106,210,.14),transparent 68%),
    linear-gradient(180deg,rgba(255,255,255,.018),transparent 30%);
}
.landing::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-image:
    linear-gradient(to right,rgba(247,248,248,.028) 1px,transparent 1px),
    linear-gradient(to bottom,rgba(247,248,248,.028) 1px,transparent 1px);
  background-size:44px 44px;
  -webkit-mask-image:radial-gradient(ellipse 78% 64% at 50% 42%,#000 0%,transparent 78%);
  mask-image:radial-gradient(ellipse 78% 64% at 50% 42%,#000 0%,transparent 78%);
}
html[data-theme="light"] .landing::before{
  background:
    radial-gradient(720px 420px at 50% -12%,rgba(94,106,210,.1),transparent 68%),
    linear-gradient(180deg,rgba(8,9,10,.018),transparent 30%);
}
html[data-theme="light"] .landing::after{
  background-image:
    linear-gradient(to right,rgba(8,9,10,.045) 1px,transparent 1px),
    linear-gradient(to bottom,rgba(8,9,10,.045) 1px,transparent 1px);
}
.landing-logo{
  width:58px;height:58px;
  border-radius:14px;
  border:1px solid var(--border);
  box-shadow:0 0 0 6px rgba(255,255,255,.018),0 22px 55px rgba(0,0,0,.55);
  background:var(--bg-elev);
}
html[data-theme="light"] .landing-logo{box-shadow:0 0 0 6px rgba(8,9,10,.03),0 22px 55px rgba(20,22,26,.14)}
.landing h1{
  font-size:clamp(30px,5vw,54px);
  font-weight:600;
  line-height:1.05;
  letter-spacing:-.045em;
  color:var(--text);
  max-width:760px;
  text-wrap:balance;
}
.landing .sub{
  font-size:clamp(13.5px,1.3vw,16px);
  line-height:1.6;
  letter-spacing:-.012em;
  color:var(--text-muted);
  max-width:560px;
}
.edges{
  max-width:560px;
  gap:10px;
}
.edge-card{
  position:relative;
  padding:13px 14px;
  min-height:66px;
  border:1px solid var(--border);
  border-radius:12px;
  background:linear-gradient(180deg,rgba(255,255,255,.028),rgba(255,255,255,0) 62%),var(--bg-card);
  transition:background .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease;
  overflow:hidden;
}
.edge-card::before{
  content:"";
  position:absolute;left:0;right:0;top:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.11),transparent);
  pointer-events:none;
}
.edge-card::after{
  content:"";
  position:absolute;right:12px;top:12px;
  width:5px;height:5px;
  border-top:1px solid var(--text-dim);
  border-right:1px solid var(--text-dim);
  opacity:.55;
  transition:border-color .16s ease,opacity .16s ease,transform .16s ease;
}
.edge-card:hover{
  background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,0) 62%),var(--bg-card-hover);
  border-color:var(--border-strong);
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(0,0,0,.32);
}
.edge-card:hover::after{border-color:var(--accent-hover);opacity:1;transform:translate(1px,-1px)}
.edge-card.active{
  border-color:rgba(94,106,210,.58);
  background:linear-gradient(180deg,rgba(94,106,210,.2),rgba(94,106,210,.07)),var(--bg-card);
  box-shadow:0 0 0 1px rgba(94,106,210,.14) inset;
}
.edge-card.active::after{border-color:var(--accent-hover);opacity:1}
.edge-card .lbl{
  font-size:9px;
  font-weight:500;
  letter-spacing:.15em;
  color:var(--text-dim);
}
.edge-card .nm{
  font-size:14px;
  font-weight:500;
  letter-spacing:-.01em;
  color:var(--text);
}
.status-pill{
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  background:var(--bg-card);
  border:1px solid var(--border);
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:.02em;
  color:var(--text-muted);
}
.status-pill .dot{
  background:var(--success);
  box-shadow:0 0 0 3px rgba(39,166,68,.14);
}
.status-pill.uncal .dot{background:#d9a12b;box-shadow:0 0 0 3px rgba(217,161,43,.14)}
.status-link{
  font-size:11.5px;
  letter-spacing:-.005em;
  color:var(--text-dim);
  text-decoration:none;
  border-bottom:1px solid transparent;
  padding-bottom:1px;
  transition:color .14s ease,border-color .14s ease;
}
.status-link:hover{color:var(--accent-hover);border-bottom-color:rgba(130,143,255,.4)}
.foot-links{gap:2px 18px;margin-top:8px}
.foot-links a,.foot-links button{
  color:var(--text-dim);
  font-size:11.5px;
  letter-spacing:-.005em;
  padding:5px 0;
  text-decoration:none;
  transition:color .14s ease;
}
.foot-links a:hover,.foot-links button:hover{color:var(--text);text-decoration:none}
.hide-btn{
  margin-top:6px;
  padding:6px 14px;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:8px;
  color:var(--text-muted);
  font-size:11px;
  font-weight:500;
  transition:background .14s ease,color .14s ease,border-color .14s ease;
}
.hide-btn:hover{background:var(--bg-card-hover);border-color:var(--border-strong);color:var(--text)}

/* ---------- decorative hero panel (desktop) ---------- */
.hero-stage{display:none;position:relative;width:min(440px,100%)}
.hero-glow{
  position:absolute;
  inset:-64px -56px;
  background:radial-gradient(closest-side,rgba(94,106,210,.22),transparent 72%);
  filter:blur(28px);
  pointer-events:none;
}
html[data-theme="light"] .hero-glow{background:radial-gradient(closest-side,rgba(94,106,210,.13),transparent 72%)}
.hero-card{
  position:relative;
  z-index:1;
  width:100%;
  padding:16px;
  border:1px solid var(--border);
  border-radius:16px;
  background:linear-gradient(180deg,#111214 0%,#0a0b0c 100%);
  box-shadow:0 40px 90px rgba(0,0,0,.6),0 1px 0 rgba(255,255,255,.04) inset;
}
html[data-theme="light"] .hero-card{
  background:linear-gradient(180deg,#ffffff 0%,#f6f7f7 100%);
  box-shadow:0 40px 90px rgba(20,22,26,.14),0 1px 0 rgba(255,255,255,.9) inset;
}
.hero-chrome{display:flex;align-items:center;gap:6px;margin-bottom:14px}
.hero-dot{width:6px;height:6px;border-radius:50%;background:var(--border-strong)}
.hero-chrome-label{
  margin-left:auto;
  font-family:var(--font-mono);
  font-size:8.5px;
  letter-spacing:.12em;
  color:var(--text-dim);
}
.hero-ruler{
  position:relative;
  height:196px;
  border:1px solid var(--border);
  border-radius:12px;
  background:
    radial-gradient(340px 160px at 50% 0%,rgba(94,106,210,.09),transparent 70%),
    #08090a;
  overflow:hidden;
}
html[data-theme="light"] .hero-ruler{
  background:
    radial-gradient(340px 160px at 50% 0%,rgba(94,106,210,.08),transparent 70%),
    #fbfbfc;
}
.hero-ticks{
  position:absolute;
  left:20px;right:20px;bottom:36px;
  height:56px;
  background-image:
    repeating-linear-gradient(90deg,rgba(247,248,248,.88) 0 1px,transparent 1px 40px),
    repeating-linear-gradient(90deg,rgba(247,248,248,.38) 0 1px,transparent 1px 8px);
  background-size:100% 46px,100% 22px;
  background-position:0 100%,0 100%;
  background-repeat:no-repeat;
}
html[data-theme="light"] .hero-ticks{
  background-image:
    repeating-linear-gradient(90deg,rgba(8,9,10,.8) 0 1px,transparent 1px 40px),
    repeating-linear-gradient(90deg,rgba(8,9,10,.32) 0 1px,transparent 1px 8px);
}
.hero-scale{
  position:absolute;
  left:20px;right:20px;bottom:9px;
  display:flex;
  justify-content:space-between;
  font-family:var(--font-mono);
  font-size:9.5px;
  color:rgba(247,248,248,.38);
}
html[data-theme="light"] .hero-scale{color:rgba(8,9,10,.38)}
.hero-measure{
  position:absolute;
  left:20%;width:38%;top:34%;
  height:46px;
}
.hero-measure::before,.hero-measure::after{
  content:"";
  position:absolute;
  top:0;bottom:0;
  width:1px;
  background:var(--accent-hover);
  box-shadow:0 0 10px rgba(130,143,255,.55);
}
.hero-measure::before{left:0}
.hero-measure::after{right:0}
.hero-line{
  position:absolute;
  left:0;right:0;top:50%;
  height:1px;
  background:var(--accent-hover);
  box-shadow:0 0 10px rgba(130,143,255,.55);
}
.hero-tag{
  position:absolute;
  left:50%;top:-12px;
  transform:translate(-50%,-100%);
  padding:4px 8px;
  border:1px solid rgba(130,143,255,.42);
  border-radius:6px;
  background:#15161d;
  color:#e3e6ff;
  font-family:var(--font-mono);
  font-size:9.5px;
  letter-spacing:.02em;
  white-space:nowrap;
  box-shadow:0 10px 24px rgba(0,0,0,.45);
}
html[data-theme="light"] .hero-tag{background:#ffffff;color:#3d47a8;box-shadow:0 10px 24px rgba(20,22,26,.12)}
.hero-foot{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:14px;
  font-family:var(--font-mono);
  font-size:9px;
  letter-spacing:.055em;
  color:var(--text-dim);
}
.hero-metric b{color:var(--accent-hover);font-weight:500}
.hero-sep{width:1px;height:10px;background:var(--border-strong)}
.hero-live{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--success);
}
.hero-live i{
  width:5px;height:5px;border-radius:50%;
  background:var(--success);
  box-shadow:0 0 0 3px rgba(39,166,68,.14);
}

/* ==========================================================================
   MAIN APP — chrome, panels, modals
   ========================================================================== */
.fab{
  background:rgba(15,16,17,.9);
  border:1px solid var(--border);
  border-radius:8px;
  color:var(--text-muted);
  font-weight:500;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
}
html[data-theme="light"] .fab{background:rgba(255,255,255,.9)}
.fab:hover{color:var(--text);border-color:var(--border-strong);background:var(--bg-card-hover)}
.fab[aria-pressed="true"]{color:var(--accent-hover);border-color:rgba(94,106,210,.5);background:var(--accent-soft)}
.panel,.modal{
  background:var(--bg-elev);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:0 30px 80px rgba(0,0,0,.6);
}
.panel-title{font-weight:600;letter-spacing:-.01em}
.btn{border-radius:8px;font-weight:500}
.btn-primary{background:var(--text);color:var(--bg)}
.btn-accent{background:var(--accent);color:#fff}
.btn-accent:hover{background:var(--accent-hover)}
.btn-ghost{background:var(--bg-card);border-color:var(--border);color:var(--text-muted)}
.btn-ghost:hover{color:var(--text);border-color:var(--border-strong)}
.input{background:var(--bg-input);border-color:var(--border);border-radius:8px;color:var(--text)}
.input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
#toast{
  background:rgba(15,16,17,.94);
  border:1px solid var(--border-strong);
  border-radius:10px;
  font-weight:500;
  box-shadow:0 20px 50px rgba(0,0,0,.55);
  -webkit-backdrop-filter:blur(16px);
  backdrop-filter:blur(16px);
}
html[data-theme="light"] #toast{background:rgba(255,255,255,.96)}
.ruler-el{border-color:var(--border);box-shadow:0 8px 30px rgba(0,0,0,.3)}
#ruler-bottom{bottom:calc(env(safe-area-inset-bottom, 0px) + 6px)}
.ruler-el.dragging{box-shadow:0 10px 34px rgba(94,106,210,.34),0 0 0 2px var(--accent)}
#cg-tip{border-radius:7px;box-shadow:0 10px 26px rgba(0,0,0,.4)}
.marker{box-shadow:0 3px 12px rgba(0,0,0,.45)}
.gm{border-radius:5px;letter-spacing:.02em}

/* ==========================================================================
   SUB PAGES — shared shell
   ========================================================================== */
.sh{
  background:rgba(1,1,2,.78);
  -webkit-backdrop-filter:blur(20px) saturate(170%);
  backdrop-filter:blur(20px) saturate(170%);
  border-bottom:1px solid var(--border);
  box-shadow:0 1px 0 rgba(255,255,255,.03) inset;
}
html[data-theme="light"] .sh{background:rgba(255,255,255,.82)}
.sh-in{
  max-width:920px;
  padding:12px 22px;
  gap:14px;
}
.sh .brand{
  font-weight:600;
  font-size:14px;
  letter-spacing:-.01em;
  gap:7px;
  color:var(--text);
}
.sh .brand img{border-radius:6px;box-shadow:0 0 0 1px var(--border)}
.snav{gap:2px 18px}
.snav a{
  color:var(--text-muted);
  font-size:13px;
  font-weight:400;
  letter-spacing:-.008em;
  padding:6px 0 5px;
  border-bottom:1px solid transparent;
  transition:color .14s ease,border-color .14s ease;
}
.snav a:hover{color:var(--text);text-decoration:none}
.snav a[aria-current="page"]{
  color:var(--text);
  font-weight:500;
  border-bottom-color:var(--accent);
}
.tgl{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:8px;
  width:32px;height:32px;
  color:var(--text-muted);
  font-size:14px;
  transition:background .14s ease,color .14s ease,border-color .14s ease;
}
.tgl:hover{background:var(--bg-card-hover);border-color:var(--border-strong);color:var(--text)}
.wrap{
  position:relative;
  max-width:920px;
  padding:46px 24px 88px;
}
.wrap::before{
  content:"";
  position:absolute;
  top:-120px;left:50%;
  transform:translateX(-50%);
  width:min(760px,100%);
  height:320px;
  background:radial-gradient(closest-side,rgba(94,106,210,.1),transparent 72%);
  pointer-events:none;
  z-index:-1;
}
.crumbs{
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--text-dim);
  margin-bottom:18px;
}
.crumbs a{color:var(--text-dim)}
.crumbs a:hover{color:var(--accent-hover);text-decoration:none}
h1{
  font-size:clamp(32px,4.4vw,46px);
  font-weight:600;
  line-height:1.07;
  letter-spacing:-.04em;
  color:var(--text);
  margin-bottom:16px;
  text-wrap:balance;
}
h2{
  font-size:24px;
  font-weight:600;
  letter-spacing:-.025em;
  line-height:1.2;
  margin:44px 0 10px;
}
h3{
  font-size:17px;
  font-weight:600;
  letter-spacing:-.012em;
  margin:24px 0 6px;
}
.lead{
  font-size:18px;
  line-height:1.58;
  letter-spacing:-.012em;
  color:var(--text-muted);
  max-width:720px;
  margin-bottom:24px;
}
main p{
  font-size:15px;
  line-height:1.72;
  color:var(--text-muted);
  margin-bottom:13px;
  max-width:780px;
}
main li{font-size:15px;line-height:1.7;color:var(--text-muted)}
main strong{color:var(--text);font-weight:600}
.note{
  padding:16px 18px;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:12px;
  margin:18px 0;
  box-shadow:0 1px 0 rgba(255,255,255,.02) inset;
}
.faq-q{font-weight:600;color:var(--text);margin:26px 0 6px;font-size:16px;letter-spacing:-.01em}
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:16px 0 22px;
  font-size:13.5px;
  border:1px solid var(--border);
  border-radius:10px;
  overflow:hidden;
}
th,td{
  border-bottom:1px solid var(--border);
  border-right:1px solid var(--border);
  padding:10px 12px;
  text-align:left;
  vertical-align:top;
}
th:last-child,td:last-child{border-right:0}
tr:last-child td{border-bottom:0}
th{color:var(--text);background:var(--bg-soft);font-weight:600;font-size:12px;letter-spacing:.02em}
td{color:var(--text-muted)}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  background:var(--accent);
  color:#fff;
  border-radius:8px;
  padding:10px 16px;
  font-weight:500;
  font-size:14px;
  letter-spacing:-.005em;
  min-height:40px;
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 1px 0 rgba(255,255,255,.14) inset,0 2px 8px rgba(0,0,0,.25);
  cursor:pointer;
  transition:background .14s ease,transform .1s ease;
}
.btn:hover{background:var(--accent-hover);filter:none;text-decoration:none}
.btn:active{transform:translateY(1px)}
.btn.ghost{
  background:var(--bg-card);
  color:var(--text);
  border:1px solid var(--border);
  box-shadow:none;
}
.btn.ghost:hover{background:var(--bg-card-hover);border-color:var(--border-strong)}
.cform{gap:14px;max-width:600px;margin:14px 0 8px}
.cform label{
  font-size:12px;
  font-weight:500;
  letter-spacing:.01em;
  color:var(--text-muted);
  gap:7px;
}
.cform input,.cform textarea{
  background:var(--bg-input);
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px 12px;
  min-height:42px;
  color:var(--text);
  font:inherit;
  font-weight:400;
  transition:border-color .14s ease,box-shadow .14s ease;
}
.cform input:focus,.cform textarea:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
}
.form-note{font-size:12px;color:var(--text-dim)}
.form-status{font-size:13px;color:var(--accent-hover)}
.grid-links{gap:12px;margin:20px 0}
.grid-links a{
  padding:14px 15px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg-card);
  font-size:14px;
  font-weight:500;
  letter-spacing:-.01em;
  transition:border-color .14s ease,background .14s ease,transform .14s ease;
}
.grid-links a:hover{border-color:rgba(94,106,210,.55);background:var(--accent-soft);text-decoration:none;transform:translateY(-1px)}
.grid-links a span{color:var(--text-muted);font-weight:400;font-size:12px}
.faq-item{
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg-card);
  margin:10px 0;
  transition:border-color .14s ease,background .14s ease;
}
.faq-item:hover{border-color:var(--border-strong)}
.faq-item summary{padding:14px 16px;font-weight:500;font-size:14.5px;letter-spacing:-.008em}
.faq-item summary::after{color:var(--accent-hover);font-size:17px;font-weight:400}
.faq-a{padding:0 16px 14px;font-size:14px;color:var(--text-muted);line-height:1.68;max-width:760px}
.big404{
  font-size:80px;
  font-weight:600;
  letter-spacing:-.05em;
  color:var(--text);
  background:none;
  -webkit-text-fill-color:currentColor;
  margin-bottom:10px;
}
.site-footer{
  margin-top:0;
  border-top:1px solid var(--border);
  background:var(--bg);
  padding:56px 24px 40px;
}
.site-footer .f-inner{max-width:920px;gap:40px}
.site-footer h4{
  font-size:10px;
  font-weight:500;
  text-transform:uppercase;
  letter-spacing:.14em;
  color:var(--text-dim);
  margin-bottom:10px;
}
.site-footer a{
  color:var(--text-muted);
  font-size:13px;
  padding:6px 0;
  transition:color .14s ease;
}
.site-footer a:hover{color:var(--text);text-decoration:none}
.site-footer .f-brand p{font-size:13px;line-height:1.65;color:var(--text-muted)}
.site-footer .f-brand .f-logo{font-weight:600;font-size:14px;letter-spacing:-.01em;gap:8px;margin-bottom:10px}
.site-footer .f-brand .f-logo img{border-radius:6px;box-shadow:0 0 0 1px var(--border)}
.site-footer .f-bottom{
  max-width:920px;
  margin:32px auto 0;
  padding-top:18px;
  border-top:1px solid var(--border);
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.03em;
  color:var(--text-dim);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media(min-width:1024px){
  .landing{
    display:grid;
    grid-template-columns:minmax(0,1.06fr) minmax(360px,.94fr);
    grid-template-rows:auto auto auto auto auto auto auto auto;
    column-gap:clamp(36px,6vw,88px);
    row-gap:0;
    align-content:center;
    justify-items:start;
    text-align:start;
    max-width:1280px;
    margin:0 auto;
    padding:30px clamp(32px,5vw,72px) 34px;
  }
  .landing>*{margin-top:0!important;margin-bottom:0!important}
  .landing-logo{grid-column:1;grid-row:1;margin-bottom:22px!important}
  .landing h1{grid-column:1;grid-row:2;margin-bottom:14px!important;font-size:clamp(42px,4.35vw,62px);max-width:640px}
  .landing .sub{grid-column:1;grid-row:3;margin-bottom:26px!important;max-width:520px}
  .edges{grid-column:1;grid-row:4;margin-bottom:20px!important;max-width:520px}
  .status-pill{grid-column:1;grid-row:5;margin-bottom:7px!important}
  .status-link{grid-column:1;grid-row:6;margin-bottom:22px!important}
  .foot-links{grid-column:1;grid-row:7;justify-content:flex-start;margin-bottom:6px!important}
  .hide-btn{grid-column:1;grid-row:8;justify-self:start}
  .hero-stage{display:block;grid-column:2;grid-row:1 / span 8;align-self:center;justify-self:center}
}

@media(max-width:1023px){
  .landing{padding:30px 18px 28px}
  .landing h1{font-size:clamp(30px,4.6vw,44px)}
}

@media(max-width:620px){
  .topbar{
    display:grid;
    grid-template-columns:repeat(8,minmax(0,1fr));
    grid-auto-rows:auto;
    align-items:center;
    gap:5px 2px;
    padding:7px 8px;
    min-height:0;
  }
  .brand{grid-column:1 / span 2;justify-self:start;font-size:12px;gap:5px}
  .brand [data-i18n="brand"]{display:inline}
  .brand-icon img{width:20px;height:20px}
  .seg{grid-column:3 / span 4;justify-self:center;width:100%;justify-content:center}
  .seg button{flex:1;min-width:0;padding:5px 2px;font-size:10px}
  .lang-select{grid-column:7 / span 2;justify-self:end;width:100%;max-width:none;height:32px;font-size:10px}
  .tool-group{display:contents}
  .tbtn{width:auto;gap:0}
  .tbtn .ic{width:100%;height:34px;border-radius:8px}
  .tbtn .ic svg{width:15px;height:15px}
  .tbtn .cap{font-size:7.5px;line-height:1.2;margin-top:2px}
  .ppi-chip{display:none}
  .landing{padding:26px 14px 30px;gap:12px}
  .landing h1{font-size:clamp(30px,9vw,40px);letter-spacing:-.04em}
  .landing .sub{font-size:13px;max-width:360px}
  .edges{max-width:360px;gap:8px}
  .edge-card{min-height:62px;padding:12px}
  .edge-card .nm{font-size:13px}
  .hero-stage{display:none}
  .foot-links{order:5;gap:0 14px;margin-top:2px}
  .status-pill{order:6}
  .status-link{order:7}
  .hide-btn{order:8}
  .fab-bar{
    gap:4px;
    padding:4px;
    border:1px solid var(--border);
    border-radius:12px;
    background:rgba(1,1,2,.86);
    -webkit-backdrop-filter:blur(16px) saturate(160%);
    backdrop-filter:blur(16px) saturate(160%);
    box-shadow:0 18px 44px rgba(0,0,0,.5);
  }
  body:not(.has-edge) .fab-bar{top:calc(var(--topbar-h) + 14px);bottom:auto}
  body.has-edge .fab-bar{top:auto;bottom:var(--fab-bottom)}
  html[data-theme="light"] .fab-bar{background:rgba(255,255,255,.9)}
  .fab{
    height:34px;
    padding:0 10px;
    font-size:11px;
    border:0;
    background:transparent;
    box-shadow:none;
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
  .fab:hover{background:var(--bg-card-hover)}
  .sh-in{
    display:grid;
    grid-template-columns:1fr auto;
    align-items:center;
    gap:8px 10px;
    padding:10px 16px;
  }
  .sh .brand{grid-column:1;grid-row:1}
  .tgl{grid-column:2;grid-row:1;justify-self:end}
  .snav{
    grid-column:1 / -1;
    display:flex;
    flex-wrap:nowrap;
    gap:12px;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:none;
  }
  .snav::-webkit-scrollbar{display:none}
  .snav a{font-size:11.5px;white-space:nowrap;padding:4px 0}
  .wrap{padding:32px 16px 64px}
  h1{font-size:clamp(28px,8vw,38px)}
  h2{font-size:21px;margin-top:34px}
  .lead{font-size:16px}
  .site-footer{padding:40px 18px 30px}
  .site-footer .f-inner{gap:28px}
}

@media(max-width:480px){
  table{table-layout:fixed;width:100%;font-size:12px}
  th,td{padding:8px 6px;word-break:break-word;overflow-wrap:anywhere}
}

@media(max-width:360px){
  .brand [data-i18n="brand"]{display:none}
  .tbtn .ic{height:31px}
  .tbtn .cap{font-size:6.8px}
  .ppi-chip{font-size:7.2px}
  .landing h1{font-size:26px}
  .snav{flex-wrap:wrap;overflow:visible;gap:2px 12px}
  .snav a{font-size:11px;padding:3px 0}
  .fab span{display:none}
  .fab{width:36px;justify-content:center;padding:0}
}

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

@media print{
  .topbar,.fab-bar,.hero-stage{display:none!important}
  .landing::before,.landing::after,.wrap::before{display:none!important}
  body{background:#fff;color:#000}
}
