/* Tidro site. Palette from brand/README.md: every colour is defined once here.
   body.theme-family = umbrella pages (neutral family look), body.theme-sync = Tidro Sync pages (Berry).
   Each app's accent is scoped by .app-<id> (sync, pixel, ai, pod). */
:root {
  /* Brand palette */
  --berry: #9C1D4B;
  --berry-deep: #7A1339;
  --berry-light: #F08DB0;
  --blush: #FFC9DA;
  --blush-tint: #FFF1F5;
  --ink: #1B1D22;
  --slate: #5A6070;
  --line-grey: #E1E3E5;
  --mist: #F1F2F4;
  --white: #FFFFFF;
  /* Dark-mode neutrals */
  --night: #111213;
  --night-soft: #1C1E20;
  --night-berry: #2A1620;
  --night-line: #2E3133;
  --night-fg: #E3E5E7;
  --night-muted: #A6ACB2;
  /* Status colours used by the UI illustrations */
  --green: #1F7A4D;
  --green-light: #5CC98F;
  --amber: #8A6100;
  --amber-line: #E0B03A;
  --amber-bg: #FFF5D6;
  --shadow: rgb(27 29 34 / 0.08);
  /* Family neutrals (umbrella pages, family mark) */
  --fog: #C3C8D1;                  /* lower half of the family mark; decorative only */
  --ink-soft: #3A3E47;
  /* App accents. Each base colour carries white text at >= 6:1; each light variant is >= 8:1 on --night;
     base on its tint >= 5.3:1. */
  --pixel: #0E6E6E; --pixel-deep: #0A5252; --pixel-light: #5ED0C8; --pixel-soft: #A8E6E0; --pixel-tint: #E6F5F3; /* teal 6.0:1 */
  --ai: #5B3D9C;    --ai-deep: #45297D;    --ai-light: #BBA6F2;    --ai-soft: #D9CCF7;    --ai-tint: #F2EEFB;    /* violet 8.1:1 */
  --pod: #2B4FB0;   --pod-deep: #1F3C8A;   --pod-light: #8CB8FF;   --pod-soft: #C5DAFF;   --pod-tint: #EAF1FF;   /* cobalt (Split T system; amber clashed with family Saffron) */

  /* Roles (light) */
  --fg: var(--ink);
  --muted: var(--slate);
  --bg: var(--white);
  --soft: var(--mist);
  --tint: var(--blush-tint);
  --line: var(--line-grey);
  --accent: var(--berry);          /* 7.8:1 on white */
  --accent-strong: var(--berry-deep);
  --accent-fg: var(--white);
  --route: var(--blush);           /* decorative only, never text */
  --ok: var(--green);
  /* Closing band */
  --band: var(--berry);
  --band-fg: var(--white);
  --band-muted: var(--blush);      /* 5.4:1 on Berry */
  --band-route: var(--berry-deep);
  --band-btn-fg: var(--berry);
  --band-btn-hover: var(--blush-tint);
  color-scheme: light dark;
}
/* Umbrella pages: Ink instead of Berry, Mist instead of Blush */
.theme-family {
  --tint: var(--mist);
  --accent: var(--ink);            /* 16.9:1 on white */
  --accent-strong: var(--ink-soft);
  --route: var(--line-grey);
  --band: var(--ink);
  --band-muted: var(--fog);        /* 10:1 on Ink */
  --band-route: var(--ink-soft);
  --band-btn-fg: var(--ink);
  --band-btn-hover: var(--mist);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: var(--night-fg);
    --muted: var(--night-muted);
    --bg: var(--night);
    --soft: var(--night-soft);
    --tint: var(--night-berry);
    --line: var(--night-line);
    --accent: var(--berry-light);  /* 8.2:1 on --night */
    --accent-strong: var(--blush);
    --accent-fg: var(--night);
    --route: var(--berry-deep);
    --ok: var(--green-light);
    --shadow: rgb(0 0 0 / 0.4);
  }
  .theme-family {
    --tint: var(--night-soft);
    --accent: var(--night-fg);
    --accent-strong: var(--white);
    --accent-fg: var(--night);
    --route: var(--night-line);
    --band: var(--night-soft);
    --band-fg: var(--night-fg);
    --band-muted: var(--night-muted);
    --band-route: var(--night-line);
    --band-btn-fg: var(--night);
    --band-btn-hover: var(--fog);
  }
}

/* App accents: --tile* are the fixed icon colours, --app* follow light/dark like --accent */
.app-sync { --mark: #F08DB0; --tile: var(--berry); --tile-soft: var(--blush);      --app: var(--berry); --app-strong: var(--berry-deep); --app-tint: var(--blush-tint); }
.app-pixel { --mark: #5ED0C8; --tile: var(--pixel); --tile-soft: var(--pixel-soft); --app: var(--pixel); --app-strong: var(--pixel-deep); --app-tint: var(--pixel-tint); }
.app-ai { --mark: #BBA6F2; --tile: var(--ai);    --tile-soft: var(--ai-soft);    --app: var(--ai);    --app-strong: var(--ai-deep);    --app-tint: var(--ai-tint); }
.app-pod { --mark: #8CB8FF; --tile: var(--pod);   --tile-soft: var(--pod-soft);   --app: var(--pod);   --app-strong: var(--pod-deep);   --app-tint: var(--pod-tint); }
.app-sync, .app-pixel, .app-ai, .app-pod { --app-fg: var(--white); }
@media (prefers-color-scheme: dark) {
  .app-sync  { --app: var(--berry-light); --app-strong: var(--blush);      --app-tint: var(--night-berry); }
  .app-pixel { --app: var(--pixel-light); --app-strong: var(--pixel-soft); --app-tint: #102826; }
  .app-ai    { --app: var(--ai-light);    --app-strong: var(--ai-soft);    --app-tint: #1F1A2E; }
  .app-pod   { --app: var(--pod-light);   --app-strong: var(--pod-soft);   --app-tint: #141E33; }
  .app-sync, .app-pixel, .app-ai, .app-pod { --app-fg: var(--night); }
}
.app-tile { display: block; flex: none; }
.app-tile-bg { fill: var(--ink); }
.app-tile-top { fill: #FFFFFF; }
.app-tile-bottom { fill: var(--mark); }

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 17px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 1rem; }
h2 { font-size: 1.7rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); font-size: 0.95rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 720px; }

/* Focus: always visible, in the brand colour */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--accent); color: var(--accent-fg); padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; color: var(--accent-fg); }

/* Header and footer */
.nav { border-bottom: 1px solid var(--line); background: var(--bg); }
.nav-row, .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.nav-row { min-height: 72px; padding-top: 12px; padding-bottom: 12px; }
.nav nav, .footer nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nav nav a, .footer a { color: var(--fg); text-decoration: none; }
.nav nav a:hover, .footer a:hover { color: var(--accent); }
.nav nav a.btn { color: var(--accent-fg); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 40px; width: auto; }
.footer { border-top: 1px solid var(--line); padding: 40px 0 28px; color: var(--muted); font-size: 0.95rem; background: var(--soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-brand p { margin: 12px 0 0; max-width: 22em; }
.footer .footer-grid nav { flex-direction: column; align-items: flex-start; gap: 6px; }
.footer-head { margin: 0 0 4px; font-weight: 600; color: var(--fg); }
.footer-base { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.footer .soon { margin-left: 6px; }
.footer .brand img { height: 32px; }
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Apps menu in the header: a <details> dropdown */
.menu { position: relative; border: 0; padding: 0; }
.menu summary { cursor: pointer; list-style: none; font-weight: 400; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; display: inline-block; margin-left: 6px; vertical-align: 0.2em; border: 5px solid transparent; border-top-color: currentColor; border-bottom: 0; }
.menu summary:hover { color: var(--accent); }
.menu-list { position: absolute; z-index: 20; top: calc(100% + 12px); left: -12px; min-width: 200px; margin: 0; padding: 8px; list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px var(--shadow); }
.nav .menu-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.nav .menu-list a:hover { background: var(--soft); color: var(--fg); }
.menu-list .dot { width: 12px; height: 12px; border-radius: 4px; background: var(--tile); }
.soon { display: inline-block; font-size: 0.75rem; line-height: 1.5; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.menu-list .soon { margin-left: auto; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-fg); }
.btn-sm { padding: 6px 14px; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--tint); color: var(--accent-strong); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.5rem 0 0.5rem; }

/* Hero, with the S route from the logo as a quiet background mark */
.hero { position: relative; overflow: hidden; background: var(--tint); padding: 80px 0 64px; }
.hero > .wrap { position: relative; }
.hero-route { position: absolute; width: 640px; height: 640px; right: -170px; top: -90px; color: var(--route); pointer-events: none; }
.hero h1 { max-width: 15em; }
.band { padding-top: 8px; }
.page { padding-top: 40px; padding-bottom: 64px; max-width: 800px; }

/* Closing call to action: Berry band on Sync pages, Ink band on umbrella pages */
.hero.end { text-align: center; margin-top: 72px; background: var(--band); color: var(--band-fg); }
.hero.end .hero-route { color: var(--band-route); right: auto; left: -220px; top: -160px; }
.hero.end .cta { justify-content: center; }
.hero.end h2 { margin-top: 0; }
.hero.end .muted { color: var(--band-muted); }
.hero.end .btn { background: var(--white); color: var(--band-btn-fg); border-color: var(--white); }
.hero.end .btn:hover { background: var(--band-btn-hover); color: var(--band-btn-fg); }
.hero.end .btn-ghost { background: transparent; color: var(--band-fg); border-color: var(--band-muted); }
.hero.end .btn-ghost:hover { background: transparent; color: var(--band-fg); border-color: var(--band-fg); }
.hero.end :focus-visible { outline-color: var(--band-fg); }

/* Cards */
.cards { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cards li { background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; padding: 20px; }
.cards h3 { margin-bottom: 6px; }
.cards p { margin: 0; }

/* How it works: numbered stops on one route, from a Berry store dot to a Blush one */
.steps { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding-right: 12px; }
.steps li::before {
  content: counter(step);
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent); color: var(--accent-fg);
  font-weight: 700;
}
.steps li:last-child::before { background: var(--route); color: var(--fg); }
.steps li:not(:last-child)::after {
  content: ""; position: absolute;
  left: 48px; right: -8px; top: 17px; height: 6px;
  border-radius: 3px; background: var(--route);
}
.steps p { margin: 0; }
@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .steps li { padding: 0 0 0 60px; min-height: 40px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .steps li:not(:last-child)::after { left: 17px; right: auto; top: 48px; bottom: -20px; width: 6px; height: auto; }
}

.grid2 { display: grid; gap: 0 40px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Tables */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
tbody th { color: var(--accent); }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; }
summary::marker { color: var(--accent); }
details p { margin: 8px 0 0; }

@media (max-width: 600px) {
  .nav nav { gap: 14px; font-size: 15px; }
  .hero { padding: 48px 0 40px; }
  .hero-route { width: 240px; height: 240px; right: -150px; top: -50px; }
  .lead { font-size: 1.1rem; }
}

/* User guide */
.guide { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding-top: 40px; padding-bottom: 64px; }
.guide-nav { position: sticky; top: 16px; align-self: start; display: flex; flex-direction: column; gap: 4px; font-size: 0.95rem; }
.guide-nav a { color: var(--fg); text-decoration: none; padding: 4px 10px; border-radius: 6px; display: block; border-left: 3px solid transparent; }
.guide-nav a:hover { color: var(--accent); }
.guide-nav a[aria-current="page"] { background: var(--tint); color: var(--accent); font-weight: 600; border-left-color: var(--accent); border-radius: 0 6px 6px 0; }
.guide-home { font-weight: 700; }
.guide-group { margin: 16px 0 4px; padding: 0 8px; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.guide-body { min-width: 0; max-width: 760px; }
.guide-body h2 { scroll-margin-top: 16px; }
.guide-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); }
.guide-index { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.guide-index li { background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; padding: 20px; }
.guide-index h2 { font-size: 1.2rem; margin: 0 0 8px; }
.guide-index .guide-group { padding: 0; margin: 0 0 6px; }
.guide-index p { margin: 0; }
.tip { background: var(--tint); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; }
.warn { background: var(--soft); border-left: 4px solid var(--amber-line); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; }
@media (max-width: 800px) {
  .guide { grid-template-columns: 1fr; gap: 16px; }
  .guide-nav { position: static; }
}

/* Landing: feature rows and UI illustrations */
.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 10px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-top: 64px; }
.feature h2 { margin-top: 0; }
.feature.reverse > :first-child { order: 2; }
/* Feature bullets are store dots */
.feature ul { list-style: none; padding: 0; }
.feature li { position: relative; padding-left: 24px; margin: 6px 0; }
.feature li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.mock { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px var(--shadow); overflow: hidden; font-size: 0.9rem; }
.mock-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; font-weight: 600; border-bottom: 1px solid var(--line); background: var(--soft); }
.mock-table { width: 100%; }
.mock-table th, .mock-table td { padding: 8px 16px; white-space: normal; }
.mock-ok { color: var(--ok); font-weight: 600; }
.mock-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; }
.mock-btn { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-weight: 600; }
.mock-btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.mock-pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 0.8rem; font-weight: 600; background: var(--soft); border: 1px solid var(--line); }
.mock-pill.on { color: var(--accent); border-color: var(--accent); }
.mock-pill.off { color: var(--muted); }
.mock-pill.warn { color: var(--amber); border-color: var(--amber-line); background: var(--amber-bg); }
.mock-formula { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 24px 16px; font-size: 1.1rem; font-weight: 600; }
.mock-formula .op { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-weight: 500; }
/* Included features: dot bullets */
.checklist { list-style: none; padding: 0; display: grid; gap: 10px 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.checklist li { position: relative; padding-left: 22px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border-radius: 50%; border: 3px solid var(--accent); box-sizing: border-box; }
@media (max-width: 800px) {
  .hero-grid, .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature.reverse > :first-child { order: 0; }
  .feature { padding-top: 40px; }
}

/* Guide screenshots */
.shot { margin: 16px 0 24px; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 16px var(--shadow); }
.shot figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* Umbrella home: the app family in the hero, app cards */
.family { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.family li { display: flex; flex-direction: column; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 8px 24px var(--shadow); }
.family .app-tile { width: 56px; height: 56px; margin-bottom: 10px; }
.family-name { font-weight: 700; }
.family .muted { font-size: 0.85rem; }
.apps { list-style: none; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.app-card { --accent: var(--app); --accent-strong: var(--app-strong); --accent-fg: var(--app-fg); --tint: var(--app-tint);
  display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-top: 4px solid var(--tile); border-radius: 14px; padding: 22px; }
.app-card h3 { margin: 0 0 4px; }
.app-head { display: flex; gap: 14px; align-items: center; }
.app-head .app-tile { width: 52px; height: 52px; }
.app-card > p { margin: 14px 0 0; }
.app-card .app-links { margin-top: auto; padding-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.app-card .btn { padding: 8px 16px; }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 600; line-height: 1.6; border-radius: 999px; padding: 0 10px; background: var(--app); color: var(--app-fg); }
.badge-soon { background: var(--app-tint); color: var(--app); }
@media (max-width: 600px) {
  .family { gap: 10px; }
  .family li { padding: 14px; }
  .family .app-tile { width: 44px; height: 44px; }
}

/* Legal pages */
.legal-table th, .legal-table td { white-space: normal; vertical-align: top; }
.legal-table th { width: 26%; }
.app-card .app-links { align-items: center; }
.app-card .more { font-weight: 600; text-decoration: none; }
.app-card .more:hover { text-decoration: underline; }
