/* StuFly site styles. Palette matches the app icon and the phone app theme. */
:root {
  --saltire: #1b5fad;
  --saltire-dark: #0f3f7a;
  --sky: #96cbe6;
  --sky-pale: #ddeef8;
  --navy: #0e2a4a;
  --grass: #a5c375;
  --hill: #5e7447;
  --orange: #ff6600;

  --bg: #f4f8fb;
  --surface: #ffffff;
  --surface-2: #e3eef6;
  --fg: #0a0f14;
  --muted: #5a6b7b;
  --rule: #c9d8e4;
  --accent: var(--saltire);
  --accent-soft: var(--sky-pale);
  --good: #4f7a2e;
  --shadow: 0 1px 2px rgba(14, 42, 74, .06), 0 8px 24px rgba(14, 42, 74, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1624;
    --surface: #13233a;
    --surface-2: #1b3050;
    --fg: #eef4fa;
    --muted: #9fb4ca;
    --rule: #2a4265;
    --accent: var(--sky);
    --accent-soft: #1b3050;
    --good: var(--grass);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 68rem; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, var(--saltire-dark), var(--saltire));
  color: #fff;
  box-shadow: 0 2px 12px rgba(14, 42, 74, .25);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; flex-shrink: 0; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { margin-left: auto; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .45rem .95rem; border-radius: 999px; white-space: nowrap;
  opacity: .85; transition: background .15s, opacity .15s;
}
.site-nav a:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.site-nav a[aria-current="page"] { opacity: 1; background: #fff; color: var(--saltire); }
@media (max-width: 420px) {
  .brand span { display: none; }
  .site-nav a { padding: .4rem .75rem; }
}

/* ---------- Type & layout ---------- */
main { padding-block: 2rem 3rem; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 .75rem; }
h2 { font-size: clamp(1.45rem, 3vw, 1.8rem); margin: 0 0 1rem; }
h3 { font-size: 1.1rem; margin: 1.6rem 0 .4rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: .35rem; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; margin: 0 0 .4rem; }
.lede { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--muted); max-width: 40rem; }
.hl { color: var(--orange); }
section.block { margin-top: 3.5rem; }
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 18px;
  padding: 1.25rem 1.4rem; box-shadow: var(--shadow);
}
.muted { color: var(--muted); }
.note {
  border-left: 4px solid var(--orange); background: var(--surface);
  padding: .8rem 1rem; border-radius: 0 12px 12px 0; color: var(--muted); font-size: .95rem;
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.2rem; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid var(--saltire); transition: transform .12s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--saltire); color: #fff; }
.btn-secondary { color: var(--accent); border-color: currentColor; background: transparent; }
.btn svg { width: 1.2em; height: 1.2em; fill: currentColor; }

/* ---------- Hero ---------- */
.hero { padding-top: 1.5rem; }
.hero-banner {
  border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 1024 / 500; background: var(--navy);
}
.hero-banner img { width: 100%; height: 100%; object-fit: cover; }
.hero-text { margin-top: 1.75rem; display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 800px) { .hero-text { grid-template-columns: 1fr auto; } }
.hero-text h1 { margin-bottom: .5rem; }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: 1rem; }
.feature h3 { margin: .75rem 0 .3rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.feature-icon svg { width: 24px; height: 24px; fill: currentColor; }

/* ---------- Tabs ---------- */
.tablist {
  display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none;
  padding: .3rem; margin: 0 0 1.25rem;
  background: var(--surface-2); border-radius: 999px; width: max-content; max-width: 100%;
}
.tablist::-webkit-scrollbar { display: none; }
.tablist [role="tab"] {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .95rem;
  color: var(--muted); background: transparent;
  padding: .5rem 1.05rem; border-radius: 999px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.tablist [role="tab"]:hover { color: var(--fg); }
.tablist [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 4px rgba(14, 42, 74, .15); }
[role="tabpanel"][hidden] { display: none; }
[role="tabpanel"] { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { [role="tabpanel"] { animation: none; } .btn { transition: none; } }

/* ---------- Watch screen panels ---------- */
.screen-panel { display: grid; gap: 1.5rem 2.5rem; align-items: center; }
@media (min-width: 760px) { .screen-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.watches { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.watch {
  width: min(250px, 72vw); aspect-ratio: 1; border-radius: 50%; margin: 0;
  padding: 10px; background: radial-gradient(circle at 30% 25%, #4a5563, #11161c 70%);
  box-shadow: 0 0 0 3px #2a323c, 0 14px 30px rgba(0, 0, 0, .35);
}
.watch img { width: 100%; height: 100%; border-radius: 50%; background: #000; }
.watches.two .watch { width: min(200px, 36vw); padding: 6px; }
.screen-panel h3 { margin-top: 0; font-size: 1.35rem; }
.screen-panel ul { color: var(--muted); }

/* ---------- Guide ---------- */
.guide-layout h2 { margin-top: 2.75rem; padding-top: .25rem; }
.guide-layout h2:first-of-type { margin-top: 1rem; }
.toc { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.toc a {
  display: inline-block; padding: .3rem .8rem; border-radius: 999px; font-size: .9rem;
  background: var(--accent-soft); text-decoration: none; font-weight: 600;
}
.with-shot { display: grid; gap: 1.25rem 2rem; align-items: start; }
@media (min-width: 760px) { .with-shot { grid-template-columns: minmax(0, 1fr) 15rem; } }
.phone-shot {
  margin: 0; border-radius: 22px; overflow: hidden; border: 6px solid #11161c;
  box-shadow: var(--shadow); max-width: 15rem; justify-self: center; background: #11161c;
}
.with-shot .watch { width: 13rem; justify-self: center; }
dl.settings { display: grid; gap: .1rem 1.25rem; }
@media (min-width: 640px) { dl.settings { grid-template-columns: 12rem 1fr; } }
dl.settings dt { font-weight: 700; margin-top: .6rem; }
dl.settings dd { margin: 0 0 .2rem; color: var(--muted); }
@media (min-width: 640px) { dl.settings dt, dl.settings dd { margin-top: .6rem; } }

/* ---------- Privacy tables ---------- */
.summary ul { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1rem; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid var(--rule); }
th { color: var(--muted); font-weight: 600; }
.prose { max-width: 44rem; }
.prose h2 { font-size: 1.3rem; margin: 2.5rem 0 .6rem; }
.prose .meta { color: var(--muted); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); margin-top: 3rem; }
.site-footer .wrap { padding-block: 1.75rem; display: grid; gap: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .95rem; align-items: center; }
.footer-links strong { display: flex; align-items: center; gap: .5rem; }
.footer-links img { width: 24px; height: 24px; border-radius: 6px; }
.site-footer .disclaimer { color: var(--muted); font-size: .85rem; margin: 0; }
.prose > header { border-bottom: 1px solid var(--rule); padding-bottom: 1.25rem; margin-bottom: 1.75rem; }
.prose code { font-size: .9em; }
@media (max-width: 560px) {
  /* Wrap rather than hide tabs off-screen on phones */
  .tablist { flex-wrap: wrap; width: auto; border-radius: 22px; }
}
