/* AirStartersDirect tokens — matches airstartersdirect.com (starter yellow, signal red, charcoal, Montserrat) */
@font-face { font-family: "Montserrat"; font-weight: 500; font-display: swap; src: url("fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-display: swap; src: url("fonts/montserrat-latin-800-normal.woff2") format("woff2"); }
:root {
  --brand: #ffc34b;          /* starter yellow */
  --brand-strong: #f2a900;
  --brand-ink: #1c1c1c;      /* text on brand */
  --brand-tint: #fff8e6;
  --brand-text: #1c1c1c;
  --cta: #e10600;            /* signal red */
  --cta-strong: #b80500;
  --ink: #1c1c1c;
  --ink-2: #4a4a4a;
  --muted: #6b6b6b;
  --bg: #efefec;
  --surface: #ffffff;
  --surface-2: #f7f7f5;
  --line: #dcdcd7;
  --appbar: #1c1c1c;
  --appbar-ink: #ffffff;
  --mark-bg: var(--brand);
  --mark-ink: var(--brand-ink);
  --accent-line: var(--brand);
  --focus: #1c1c1c;
  --display: "Montserrat", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --text: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --readout: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --readout-weight: 800;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f1ee; --ink-2: #cfcfca; --muted: #a3a3a0;
    --bg: #141414; --surface: #1f1f1e; --surface-2: #262625; --line: #3a3a38;
    --brand-tint: #2d2615; --brand-text: #ffc34b; --appbar: #0d0d0d; --focus: #ffc34b;
  }
}
/* Shared UI core for the free tool apps. Site look comes from tokens.css (loaded first). */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--text); min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 0.75em; }
a { color: inherit; }
.i { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }
.i-lg { width: 28px; height: 28px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* App bar */
.appbar { position: sticky; top: 0; z-index: 20; background: var(--appbar); color: var(--appbar-ink); border-bottom: 4px solid var(--accent-line); }
.appbar-in { max-width: 980px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.appbar .mark { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--mark-bg); color: var(--mark-ink); flex: none; }
.appbar .mark .i { width: 22px; height: 22px; }
.appbar .names { min-width: 0; flex: 1; }
.appbar .site { display: block; font-size: 0.75rem; opacity: 0.75; text-decoration: none; }
.appbar h1 { font-size: 1.05rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .acts { display: flex; gap: 6px; align-items: center; }
.pill-offline { display: inline-flex; gap: 4px; align-items: center; font-size: 0.75rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: #ffd48a; color: #3d2700; }

/* Hero */
.hero { position: relative; color: #fff; background-color: #111; background-position: center; background-size: cover; background-repeat: no-repeat; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,10,.92) 0%, rgba(10,10,10,.75) 45%, rgba(10,10,10,.15) 100%); }
.hero-in { position: relative; max-width: 980px; margin: 0 auto; padding: 28px 16px 22px; }
.hero h2 { font-size: clamp(1.6rem, 4.6vw, 2.5rem); font-weight: 800; max-width: 17ch; }
.hero .lede { max-width: 46ch; margin: 10px 0 18px; color: #e9e9e9; font-size: 1.02rem; }
.howto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; max-width: 720px; counter-reset: s; }
.howto li { counter-increment: s; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 10px 12px; font-size: 0.86rem; line-height: 1.35; backdrop-filter: blur(4px); }
.howto li::before { content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 800 0.8rem var(--display); margin-right: 6px; }
.hero.compact .howto, .hero.compact .lede { display: none; }
.hero.compact .hero-in { padding-top: 16px; padding-bottom: 14px; }
.hero .credit { position: absolute; right: 10px; bottom: 6px; font-size: 0.68rem; opacity: 0.6; }

/* Tabs */
.tabs { position: sticky; top: 62px; z-index: 15; background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs-in { max-width: 980px; margin: 0 auto; display: flex; padding: 0 8px; overflow-x: auto; }
.tabs button { flex: 1 0 auto; display: inline-flex; gap: 8px; align-items: center; justify-content: center; background: none; border: 0; padding: 13px 14px; font: 600 0.95rem var(--display); color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--cta); }

/* Layout */
main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 18px 16px 8px; }
.stack > * + * { margin-top: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-head .badge { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-tint); color: var(--ink); flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.span2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .howto { grid-template-columns: 1fr; } .howto li { padding: 8px 10px; } }

/* Fields */
label { display: block; font: 600 0.9rem var(--display); margin-bottom: 6px; }
input[type="text"], input[type="number"], select { width: 100%; font: 600 1.05rem var(--text); color: var(--ink); background: var(--surface); padding: 12px 12px; border: 2px solid var(--line); border-radius: 10px; min-height: 48px; }
input:focus, select:focus { outline: none; border-color: var(--brand-strong); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 30%, transparent); }
.row { display: flex; gap: 8px; align-items: stretch; }
.row > input { flex: 1; min-width: 0; }
.row > select { width: auto; flex: none; }

/* Buttons & chips */
.btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 46px; padding: 10px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 700 0.95rem var(--display); text-decoration: none; cursor: pointer; transition: transform .08s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-cta { background: var(--cta); border-color: var(--cta); color: #fff; }
.btn-cta:hover { background: var(--cta-strong); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 0.85rem; }
.appbar .btn-sm { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; gap: 6px; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); font: 600 0.85rem var(--text); cursor: pointer; }
.chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 12px; border-radius: 9px; font: 600 0.88rem var(--text); color: var(--muted); cursor: pointer; min-height: 38px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* Readout */
.readout { font: var(--readout-weight) clamp(2.6rem, 9vw, 3.6rem)/1 var(--readout); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.readout small { font-size: 0.42em; font-weight: 600; margin-left: 6px; opacity: 0.8; }

/* Callouts */
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 0.93rem; background: var(--surface-2); border: 1px solid var(--line); }
.callout .i { margin-top: 2px; }
.callout.ok { background: color-mix(in srgb, #1f8a4c 12%, var(--surface)); border-color: color-mix(in srgb, #1f8a4c 35%, var(--surface)); }
.callout.ok .i { color: #1f8a4c; }
.callout.warn { background: color-mix(in srgb, #d98a00 14%, var(--surface)); border-color: color-mix(in srgb, #d98a00 40%, var(--surface)); }
.callout.warn .i { color: #b26b00; }
.callout.info { background: var(--brand-tint); border-color: color-mix(in srgb, var(--brand) 40%, var(--surface)); }
details.fold { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
details.fold > summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; gap: 10px; align-items: center; font: 700 0.98rem var(--display); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold > .fold-body { padding: 0 18px 16px; }

/* Quote band */
.cta-band { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; background: var(--appbar); color: var(--appbar-ink); border-radius: 16px; padding: 20px; }
.cta-band .art { width: 64px; height: 64px; border-radius: 14px; background: var(--mark-bg); color: var(--mark-ink); display: grid; place-items: center; }
.cta-band .art .i { width: 34px; height: 34px; }
.cta-band h2 { color: inherit; }
.cta-band p { opacity: .85; margin: 4px 0 12px; }
.cta-band .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.cta-band .btn:not(.btn-cta) { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
@media (max-width: 560px) { .cta-band { grid-template-columns: 1fr; } .cta-band .art { display: none; } }

/* Footer, toast */
.foot { max-width: 980px; margin: 0 auto; padding: 18px 16px 32px; font-size: 0.82rem; color: var(--muted); text-align: center; }
.foot a { color: var(--ink-2); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 999px; opacity: 0; transition: all .2s; pointer-events: none; font-weight: 600; font-size: 0.9rem; z-index: 50; display: inline-flex; gap: 8px; align-items: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.ioshint { display: flex; gap: 10px; align-items: center; }

/* Embedded inside a store page */
body.embedded .appbar, body.embedded .foot, body.embedded .ioshint, body.embedded .hero { display: none; }
body.embedded .tabs { position: static; }
body.embedded main { padding: 8px 0; }

@media print {
  .appbar, .tabs, .hero, .foot, .cta-band, .no-print, #toast { display: none !important; }
  body { background: #fff; color: #000; }
  .panel { border-color: #bbb; break-inside: avoid; }
}
@media (max-width: 560px) { .hero .lede { display: none; } .hero-in { padding: 18px 16px 14px; } .hero h2 { margin-bottom: 12px; } }
