/* SM NexStudio — Design A "Daylight"
   Layout: airy light canvas; each app gets a wide panel tinted in its own colours, phones break the panel edge. */
:root {
  --paper: #F5F6F8;
  --surface: #FFFFFF;
  --ink: #15171C;
  --ink-2: #4B515D;
  --ink-3: #6B7280;
  --line: #E3E6EB;
  --brand: #D85A30;
  --txs: #1F5FB8;
  --txs-tint: #DDEAFB;
  --txs-deep: #123C78;
  --pg: #F6B819;
  --pg-tint: #FFF1C7;
  --pg-sky: #A2D4E6;
  --pg-ink: #2A1F06;
  --on-dark: #FFFFFF;

  --f-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --t-hero: clamp(2.35rem, 1.5rem + 3.9vw, 4.5rem);
  --t-h2: clamp(1.85rem, 1.35rem + 2vw, 3rem);
  --t-h3: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  --t-lede: clamp(1.05rem, 1rem + .3vw, 1.25rem);

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1200px;
  --r-xl: clamp(22px, 3vw, 36px);
  --r-md: 14px;
  --shadow: 0 1px 2px rgb(21 23 28 / .06), 0 12px 40px -12px rgb(21 23 28 / .22);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 750; line-height: 1.04; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--txs); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--on-dark); padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.25em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1 var(--f-body); text-decoration: none; white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { min-height: 40px; padding: .55em 1em; font-size: .9375rem; }
.btn--ink { background: var(--ink); color: var(--on-dark); }
.btn--ink:hover { box-shadow: 0 8px 20px -8px rgb(21 23 28 / .6); }
.btn--ghost { border-color: rgb(21 23 28 / .18); color: var(--ink); background: rgb(255 255 255 / .6); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--txs { background: var(--txs); color: var(--on-dark); }
.btn--pg { background: var(--pg); color: var(--pg-ink); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px);
  background: rgb(245 246 248 / .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.125rem/1 var(--f-display); letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; }
.nav__menu { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.nav__menu > a:not(.btn) { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .975rem; padding-block: 6px; }
.nav__menu > a:not(.btn):hover, .nav__menu > a[aria-current] { color: var(--ink); }
.nav__menu > a[aria-current]:not(.btn) { box-shadow: inset 0 -2px 0 var(--brand); }
.nav__toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu { position: absolute; inset: calc(100% + 6px) var(--gutter) auto; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; }
  .nav__menu.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__menu > a:not(.btn) { padding: 12px 12px; border-radius: 10px; font-size: 1.0625rem; }
  .nav__menu > a:not(.btn):hover { background: var(--paper); }
  .nav__menu > a[aria-current]:not(.btn) { box-shadow: none; background: var(--paper); }
  .nav__menu .btn { margin-top: 6px; }
}

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 .8125rem/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(24px, 5vw, 72px);
  padding-block: clamp(36px, 7vw, 96px) clamp(40px, 6vw, 80px); }
.hero__copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 { font-size: var(--t-hero); }
.lede { font-size: var(--t-lede); color: var(--ink-2); max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }
.hero__art { position: relative; min-height: clamp(380px, 46vw, 600px); }
.phone { margin: 0; position: absolute; width: clamp(170px, 19vw, 260px); border-radius: clamp(24px, 3vw, 38px); padding: clamp(5px, .6vw, 8px);
  background: #101217; box-shadow: var(--shadow); }
.phone img { border-radius: calc(clamp(24px, 3vw, 38px) - 6px); width: 100%; aspect-ratio: 560 / 1245; object-fit: cover; }
.phone--front { left: 6%; top: 4%; transform: rotate(-5deg); z-index: 2; }
.phone--back { right: 6%; top: 12%; transform: rotate(6deg); }
.hero__chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: .9375rem; }
.hero__chip svg { color: var(--brand); }
.hero__chip--a { left: 0; bottom: 10%; }
.hero__chip--b { right: 2%; top: 2%; }
.hero__chip--b svg { color: var(--txs); }
@media (prefers-reduced-motion: no-preference) {
  .phone--front { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .phone--back { animation: rise .9s .12s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { translate: 0 24px; } to { translate: 0 0; } }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__art { min-height: clamp(330px, 92vw, 520px); max-width: 520px; width: 100%; margin-inline: auto; }
  .phone { width: clamp(150px, 40vw, 230px); }
}

/* Section heads */
.sec-head { display: grid; gap: 12px; max-width: 44rem; margin-bottom: clamp(24px, 4vw, 44px); }
.sec-head h2 { font-size: var(--t-h2); }
.sec-head p { color: var(--ink-2); font-size: var(--t-lede); }

/* Product panels */
.apps { padding-block: clamp(32px, 6vw, 72px); }
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  border-radius: var(--r-xl); padding: clamp(22px, 4.5vw, 56px); margin-bottom: clamp(18px, 3vw, 28px); overflow: hidden; }
.product--txs { background: var(--txs-tint); }
.product--pg { background: var(--pg-tint); }
.product__copy { display: grid; gap: 22px; min-width: 0; }
.product__id { display: flex; align-items: center; gap: 16px; }
.product__id img { width: 64px; height: 64px; border-radius: 16px; flex: none; box-shadow: 0 6px 16px -8px rgb(0 0 0 / .4); }
.product__id h3 { font-size: var(--t-h3); }
.product__id p { color: var(--ink-2); font-size: .9375rem; margin-top: 4px; }
.product__lede { font-size: 1.0625rem; color: var(--ink-2); max-width: 34em; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.stats > div { background: rgb(255 255 255 / .7); border-radius: var(--r-md); padding: 14px 14px 12px; display: flex; flex-direction: column-reverse; gap: 2px; }
.stats dt { font-size: .8125rem; color: var(--ink-3); line-height: 1.3; }
.stats dd { margin: 0; font: 750 clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem)/1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.product--txs .stats dd { color: var(--txs-deep); }
.product__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.product--pg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.product--pg .product__copy { order: 2; }
.product--pg .product__art { order: 1; }

/* ToolXStack category board */
.cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cats li { background: var(--surface); border-radius: var(--r-md); padding: 14px 14px 12px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; min-width: 0;
  box-shadow: 0 1px 2px rgb(18 60 120 / .08); }
.cat__name { font-weight: 700; grid-row: 1; grid-column: 1; min-width: 0; }
.cat__n { grid-row: 1; grid-column: 2; font: 600 .875rem/1.6 var(--f-mono); color: var(--txs); font-variant-numeric: tabular-nums; }
.cat__d { grid-column: 1 / -1; color: var(--ink-3); font-size: .8125rem; line-height: 1.35; }
/* Narrow tiles: count sits above the name so long words never run into it */
@media (max-width: 560px) {
  .cats li { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .cat__n { grid-row: 1; grid-column: 1; line-height: 1.2; }
  .cat__name { grid-row: 2; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
}

/* Panelglass art */
.product__art--pg { position: relative; display: flex; justify-content: center; min-height: clamp(360px, 40vw, 520px); }
.phone--flat { position: relative; transform: rotate(-3deg); width: clamp(190px, 22vw, 270px); }
.balloon { position: absolute; right: clamp(0px, 3vw, 40px); top: 12%; z-index: 2; display: grid; justify-items: center; gap: 8px;
  background: var(--surface); color: var(--ink); border: 3px solid var(--ink); border-radius: 50% / 46%; padding: 26px 30px 30px; min-width: 170px;
  box-shadow: 6px 6px 0 var(--pg-sky); }
.balloon::after { content: ""; position: absolute; left: 22%; bottom: -18px; width: 24px; height: 24px; background: var(--surface);
  border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: skewX(28deg) rotate(38deg); }
.balloon__text { font: 800 1.6rem/1.1 "Hanken Grotesk", "Noto Sans JP", "Noto Sans Devanagari", system-ui, sans-serif; letter-spacing: -.01em; transition: opacity .2s; }
.balloon__tag { font: 500 .6875rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.balloon.is-src .balloon__text { font-weight: 700; }
@media (max-width: 920px) {
  .product, .product--pg { grid-template-columns: 1fr; }
  .product--pg .product__copy, .product--pg .product__art { order: 0; }
  .product__art--pg { min-height: 0; padding-top: 8px; }
}
@media (max-width: 420px) {
  .stats { gap: 8px; }
  .stats > div { padding: 12px 10px 10px; }
  .cats { gap: 8px; }
  .cats li { padding: 12px; }
  .cat__d { display: none; }
  .balloon { right: 0; min-width: 140px; padding: 20px 22px 24px; }
  .balloon__text { font-size: 1.3rem; }
  .product__cta .btn { flex: 1 1 100%; }
}

/* Comparison */
.compare { padding-block: clamp(32px, 6vw, 72px); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.cmp { width: 100%; border-collapse: collapse; min-width: 560px; }
.cmp th, .cmp td { text-align: left; padding: 16px clamp(14px, 2.4vw, 28px); border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { font: 700 1rem/1.2 var(--f-display); padding-block: 20px; background: var(--paper); }
.cmp tbody th { font-weight: 600; width: 30%; }
.cmp td { color: var(--ink-2); }
.cmp tbody tr:last-child > * { border-bottom: 0; }
.cmp__app { display: inline-flex; align-items: center; gap: 10px; }
.cmp__app img { border-radius: 8px; }
.cmp__links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.cmp td:nth-child(2) { width: 30%; }

/* Band */
.band { padding-block: clamp(24px, 5vw, 56px) clamp(48px, 8vw, 96px); }
.band__in { background: var(--brand); color: var(--on-dark); border-radius: var(--r-xl); padding: clamp(28px, 6vw, 72px); display: grid; gap: 16px; justify-items: start; }
.band h2 { font-size: var(--t-h2); max-width: 18ch; }
.band p { max-width: 38em; font-size: var(--t-lede); opacity: .92; }
.band__cta { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot__in { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 28px; padding-block: 48px 32px; }
.foot__brand { display: grid; gap: 12px; align-content: start; }
.foot__brand p { color: var(--ink-3); max-width: 28em; font-size: .9375rem; }
.foot__col { display: grid; gap: 8px; align-content: start; min-width: 0; }
.foot__col h2 { font: 600 .75rem/1.4 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 4px; }
.foot__col a { text-decoration: none; color: var(--ink-2); font-size: .9375rem; overflow-wrap: anywhere; }
.foot__col a:hover { color: var(--ink); text-decoration: underline; }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px 28px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .875rem; }
@media (max-width: 760px) { .foot__in { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot__brand { grid-column: 1 / -1; } }
@media (max-width: 380px) { .foot__in { grid-template-columns: 1fr; } }

/* ---------- Policy pages ---------- */
.phero { background: var(--txs-tint); padding-block: clamp(28px, 5vw, 64px) clamp(28px, 5vw, 56px); }
.is-pg .phero { background: var(--pg-tint); }
.phero__in { display: grid; gap: 20px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.phero__title { display: flex; align-items: center; gap: clamp(14px, 2vw, 22px); }
.phero__title img { width: clamp(56px, 7vw, 72px); height: auto; border-radius: 18px; flex: none; box-shadow: 0 8px 20px -10px rgb(0 0 0 / .45); }
.phero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem); }
.phero__meta { color: var(--ink-2); margin-top: 8px; font-size: .9375rem; }
.phero__lead { font: 600 var(--t-lede)/1.4 var(--f-body); max-width: 40em; }
.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 0; }
.glance__item { background: var(--surface); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.glance dt { font-size: .8125rem; color: var(--ink-3); }
.glance dd { margin: 0; font: 700 1.0625rem/1.3 var(--f-display); }
@media (max-width: 900px) { .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding-block: clamp(28px, 5vw, 64px) clamp(48px, 8vw, 96px); align-items: start; }
.doc__toc { position: sticky; top: 92px; }
.doc__toc summary { font: 600 .75rem/1.4 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); list-style: none; cursor: default; padding-bottom: 10px; }
.doc__toc summary::-webkit-details-marker { display: none; }
.doc__toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.doc__toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); font-size: .9375rem; line-height: 1.35; }
.doc__toc a:hover { color: var(--ink); }
.doc__toc a[aria-current] { color: var(--ink); border-left-color: var(--brand); font-weight: 600; }
.doc__body { max-width: 68ch; min-width: 0; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; margin-bottom: 8px; }
.doc__sec { padding-top: 36px; }
.doc__sec h2 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); margin-bottom: 12px; letter-spacing: -.015em; }
.doc__sec p + p, .doc__sec p + ul, .doc__sec ul + p, .doc__sec .table-scroll + p { margin-top: 12px; }
.doc__sec ul { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 8px; }
.doc__sec li::marker { color: var(--brand); }
.doc__sec a, .doc__note a, .summary a { color: var(--txs); text-underline-offset: 3px; overflow-wrap: anywhere; }
code { font: 500 .85em/1 var(--f-mono); background: var(--surface); border: 1px solid var(--line); padding: .15em .4em; border-radius: 6px; overflow-wrap: anywhere; }
.doc__note { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .9375rem; }
.doc .table-scroll { margin-top: 14px; border-radius: var(--r-md); }
.flow-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .9375rem; }
.flow-table th, .flow-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.flow-table thead th { background: var(--paper); font-weight: 700; font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.flow-table td:first-child { font-weight: 600; color: var(--ink); width: 26%; }
.flow-table td { color: var(--ink-2); }
.flow-table tr:last-child td { border-bottom: 0; }
@media (max-width: 960px) {
  .doc { grid-template-columns: 1fr; }
  .doc__toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
  .doc__toc summary { cursor: pointer; padding-bottom: 0; display: flex; justify-content: space-between; align-items: center; }
  .doc__toc summary::after { content: "+"; font-size: 1.25rem; color: var(--ink-2); }
  .doc__toc details[open] summary::after { content: "−"; }
  .doc__toc details[open] ol { margin-top: 12px; }
}
@media print { .nav, .doc__toc, .foot { display: none; } .doc { display: block; } }

/* Hero headline: each sentence starts on its own line */
.hero h1 span { display: block; }
