/* ============================================================
   Nettica Help — design system
   Matches the Nettica app theme (main.dart)
   Primary:   #336699  (steel blue)
   Active:    #339966  (green — switch-on / success)
   Accent:    #CC6633  (burnt orange — highlights / ripple)
   Muted:     #808080
   Radius:    8px
   Font:      Roboto → system-ui fallback
   ============================================================ */

/* ── Self-hosted Roboto ───────────────────────────────────── */
/* Files: ../fonts/roboto-latin[-ext]-{weight}-normal.woff2
   latin-ext declared first so the browser prefers it for
   extended characters; latin covers the common ASCII range.  */

/* weight 100 */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url('../fonts/roboto-latin-ext-100-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url('../fonts/roboto-latin-100-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 200 */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('../fonts/roboto-latin-ext-200-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('../fonts/roboto-latin-200-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 300 */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/roboto-latin-ext-300-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/roboto-latin-300-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 400 */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/roboto-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/roboto-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 500 */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/roboto-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/roboto-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 600 */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/roboto-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/roboto-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 700 */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/roboto-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/roboto-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 800 */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/roboto-latin-ext-800-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/roboto-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 900 */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/roboto-latin-ext-900-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/roboto-latin-900-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* ── Self-hosted Roboto Mono ──────────────────────────────── */
/* Files: ../fonts/roboto-mono-latin[-ext]-{weight}-normal.woff2
   Weights available: 100–700 (no 800/900)                    */

/* weight 100 */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-ext-100-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-100-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 200 */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-ext-200-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-200-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 300 */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-ext-300-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-300-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 400 */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 500 */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 600 */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* weight 700 */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/roboto-mono-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* ── Design tokens ────────────────────────────────────────── */
:root {
  /* Brand colours */
  --color-primary:        #336699;
  --color-primary-dark:   #1e4d80;
  --color-primary-light:  #4d88bb;
  --color-active:         #339966;
  --color-accent:         #CC6633;
  --color-accent-light:   #FF9966;
  --color-muted:          #808080;

  /* Typography */
  --font-family:          'Roboto', system-ui, -apple-system, sans-serif;
  --font-size-base:       16px;
  --line-height-base:     1.5;

  /* Shape */
  --radius:               8px;
  --radius-lg:            16px;

  /* Transitions */
  --transition:           0.2s ease;

  /* ── Light mode surface tokens ── */
  --bg-page:              #f5f7fa;
  --bg-surface:           #ffffff;
  --bg-surface-alt:       rgba(0, 0, 0, 0.063);   /* _bodyDecorationLight */
  --bg-card:              #ffffff;                 /* _vpnContainerDecorationLight */

  --border-color:         rgba(0, 0, 0, 0.125);   /* 0x20000000 */
  --divider-color:        rgba(0, 0, 0, 0.12);

  --text-primary:         #1a1a1a;
  --text-secondary:       #808080;
  --text-on-primary:      #ffffff;

  --shadow-sm:            0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md:            0 4px 6px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.08);
  --shadow-lg:            0 10px 24px rgba(0,0,0,0.12);

  --focus-ring:           0 0 0 3px rgba(51,102,153,0.35);

  /* Nav */
  --nav-bg:               #ffffff;
  --nav-text:             #808080;
  --nav-selected:         #336699;

  /* Code blocks */
  --code-bg:              #f0f4f8;
  --code-text:            #24292e;
  --code-border:          rgba(0,0,0,0.1);
}

/* ── Dark mode surface tokens ─────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-page:              #0d0d0d;
    --bg-surface:           #121212;
    --bg-surface-alt:       rgba(255, 255, 255, 0.031);  /* _bodyDecorationDark */
    --bg-card:              rgba(255, 255, 255, 0.031);  /* _vpnContainerDecorationDark */

    --border-color:         rgba(255, 255, 255, 0.125);  /* 0x20ffffff */
    --divider-color:        rgba(255, 255, 255, 0.12);

    --text-primary:         #e8eaed;
    --text-secondary:       #9aa0a6;
    --text-on-primary:      #ffffff;

    --shadow-sm:            0 1px 3px rgba(0,0,0,0.5);
    --shadow-md:            0 4px 12px rgba(0,0,0,0.6);
    --shadow-lg:            0 10px 30px rgba(0,0,0,0.7);

    --focus-ring:           0 0 0 3px rgba(77,136,187,0.45);

    --nav-bg:               #1a1a1a;
    --nav-text:             #9aa0a6;
    --nav-selected:         #4d88bb;

    --code-bg:              #1e2530;
    --code-text:            #c9d1d9;
    --code-border:          rgba(255,255,255,0.1);
  }
}

/* ── Manual dark-mode class (JS toggle) ───────────────────── */
[data-theme="dark"] {
  --bg-page:              #0d0d0d;
  --bg-surface:           #121212;
  --bg-surface-alt:       rgba(255, 255, 255, 0.031);
  --bg-card:              rgba(255, 255, 255, 0.031);
  --border-color:         rgba(255, 255, 255, 0.125);
  --divider-color:        rgba(255, 255, 255, 0.12);
  --text-primary:         #e8eaed;
  --text-secondary:       #9aa0a6;
  --text-on-primary:      #ffffff;
  --shadow-sm:            0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:            0 4px 12px rgba(0,0,0,0.6);
  --shadow-lg:            0 10px 30px rgba(0,0,0,0.7);
  --focus-ring:           0 0 0 3px rgba(77,136,187,0.45);
  --nav-bg:               #1a1a1a;
  --nav-text:             #9aa0a6;
  --nav-selected:         #4d88bb;
  --code-bg:              #1e2530;
  --code-text:            #c9d1d9;
  --code-border:          rgba(255,255,255,0.1);
}

[data-theme="light"] {
  --bg-page:              #f5f7fa;
  --bg-surface:           #ffffff;
  --bg-surface-alt:       rgba(0, 0, 0, 0.063);
  --bg-card:              #ffffff;
  --border-color:         rgba(0, 0, 0, 0.125);
  --divider-color:        rgba(0, 0, 0, 0.12);
  --text-primary:         #1a1a1a;
  --text-secondary:       #808080;
  --text-on-primary:      #ffffff;
  --shadow-sm:            0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md:            0 4px 6px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.08);
  --shadow-lg:            0 10px 24px rgba(0,0,0,0.12);
  --focus-ring:           0 0 0 3px rgba(51,102,153,0.35);
  --nav-bg:               #ffffff;
  --nav-text:             #808080;
  --nav-selected:         #336699;
  --code-bg:              #f0f4f8;
  --code-text:            #24292e;
  --code-border:          rgba(0,0,0,0.1);
}

/* ── Reset & base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: var(--line-height-base);
  color: var(--text-primary);
  background-color: var(--bg-page);
  transition: background-color var(--transition), color var(--transition);
  min-height: 100vh;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 0.5em;
}

h1 { font-size: 2rem;    }
h2 { font-size: 1.5rem;  }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem;  }
h5 { font-size: 1rem;    }
h6 { font-size: 0.875rem; font-weight: 700; }

p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 2px;
}

strong { font-weight: 700; }
em     { font-style: italic; }

small {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

hr {
  border: none;
  border-top: 1px solid var(--divider-color);
  margin: 1.5rem 0;
}

/* ── Layout containers ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow {
  max-width: 720px;
}

/* ── Site header / nav ────────────────────────────────────── */
.site-header {
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--divider-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--transition), border-color var(--transition);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.site-header__logo img {
  height: 32px;
  width: auto;
}

.site-header__logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--nav-text);
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--nav-selected);
  background-color: rgba(51, 102, 153, 0.1);
}

/* ── Theme toggle button ──────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-surface-alt);
  cursor: pointer;
  color: var(--text-secondary);
  transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.theme-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card--flat {
  box-shadow: none;
}

.card--highlighted {
  border-color: var(--color-primary);
  border-width: 2px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 40px;       /* matches Flutter's minTapSize 48 → relaxed for web */
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              opacity var(--transition);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn:active {
  opacity: 0.85;
  transform: translateY(1px);
}

/* Primary — matches ElevatedButton / TextButton in main.dart */
.btn--primary {
  background-color: var(--color-primary);
  color: var(--text-on-primary);
}

.btn--primary:hover {
  background-color: var(--color-primary-dark);
  color: var(--text-on-primary);
  text-decoration: none;
}

/* Outlined */
.btn--outlined {
  background-color: var(--color-primary);
  color: var(--text-on-primary);
  border-color: var(--color-primary);
}

.btn--outlined:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--text-on-primary);
  text-decoration: none;
}

/* Ghost / secondary */
.btn--ghost {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--ghost:hover {
  background-color: rgba(51,102,153,0.08);
  text-decoration: none;
}

/* Success — matches switch-on colour (#339966) */
.btn--success {
  background-color: var(--color-active);
  color: var(--text-on-primary);
}

.btn--success:hover {
  background-color: #267a52;
  color: var(--text-on-primary);
  text-decoration: none;
}

/* Danger */
.btn--danger {
  background-color: #c0392b;
  color: var(--text-on-primary);
}

.btn--danger:hover {
  background-color: #a93226;
  color: var(--text-on-primary);
  text-decoration: none;
}

/* Sizes */
.btn--sm {
  padding: 0.3rem 0.875rem;
  font-size: 0.8125rem;
  min-height: 32px;
}

.btn--lg {
  padding: 0.75rem 1.75rem;
  font-size: 1.0625rem;
  min-height: 48px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Badges / chips ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  white-space: nowrap;
}

.badge--primary  { background-color: rgba(51,102,153,0.15); color: var(--color-primary); }
.badge--success  { background-color: rgba(51,153,102,0.15); color: var(--color-active);  }
.badge--accent   { background-color: rgba(204,102,51,0.15); color: var(--color-accent);  }
.badge--neutral  { background-color: var(--bg-surface-alt); color: var(--text-secondary); border: 1px solid var(--border-color); }

/* ── Alerts / callouts ────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  border-left: 4px solid transparent;
  background-color: var(--bg-surface-alt);
  margin-bottom: 1rem;
}

.alert--info {
  border-left-color: var(--color-primary);
  background-color: rgba(51,102,153,0.08);
  color: var(--text-primary);
}

.alert--success {
  border-left-color: var(--color-active);
  background-color: rgba(51,153,102,0.08);
  color: var(--text-primary);
}

.alert--warning {
  border-left-color: var(--color-accent);
  background-color: rgba(204,102,51,0.08);
  color: var(--text-primary);
}

.alert--danger {
  border-left-color: #c0392b;
  background-color: rgba(192,57,43,0.08);
  color: var(--text-primary);
}

/* ── Snackbar / toast ─────────────────────────────────────── */
/* Matches SnackBarThemeData: bg=#336699, text=white */
.snackbar {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius);
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  max-width: 480px;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="number"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.875rem;
  font-family: var(--font-family);
  font-size: 1rem;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23808080' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
}

/* ── Toggle switch ────────────────────────────────────────── */
/* Matches SwitchThemeData: track-off=#DDDDDD, track-on=#339966, thumb=white */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.switch__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__track {
  width: 48px;
  height: 28px;
  background-color: #DDDDDD;
  border: 1px solid rgba(128,128,128,0.5);
  border-radius: 999px;
  transition: background-color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.switch__thumb {
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background-color: #808080;
  border-radius: 50%;
  transition: background-color var(--transition), left var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.switch__input:checked + .switch__track {
  background-color: var(--color-active); /* #339966 */
  border-color: rgba(128,128,128,0.5);
}

.switch__input:checked ~ .switch__thumb,
.switch__input:checked + .switch__track + .switch__thumb {
  left: 23px;
  background-color: #ffffff;
}

.switch__input:focus-visible + .switch__track {
  box-shadow: var(--focus-ring);
}

/* ── Expansion panel / accordion ─────────────────────────── */
/* Matches ExpansionTileThemeData */
.accordion {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  cursor: pointer;
  background-color: var(--bg-surface);
  font-weight: 500;
  transition: background-color var(--transition);
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
}

.accordion__header:hover {
  background-color: var(--bg-surface-alt);
}

.accordion__header::marker,
.accordion__header::-webkit-details-marker {
  display: none;
}

.accordion__chevron {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: transform var(--transition);
  flex-shrink: 0;
}

details[open] .accordion__chevron {
  transform: rotate(180deg);
}

.accordion__body {
  padding: 1rem;
  border-top: 1px solid var(--divider-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

/* ── Code blocks ──────────────────────────────────────────── */
code {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  background-color: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--code-border);
  border-radius: 4px;
}

pre {
  background-color: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  padding: 0;
  background: none;
  border: none;
  font-size: 0.875rem;
  color: var(--code-text);
}

/* ── Bottom navigation bar ────────────────────────────────── */
/* Matches BottomNavigationBarThemeData */
.bottom-nav {
  display: flex;
  background-color: var(--nav-bg);
  border-top: 1px solid var(--divider-color);
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0;
  text-decoration: none;
  color: var(--nav-text);
  font-size: 0.75rem;
  font-weight: 500;
  transition: color var(--transition), background-color var(--transition);
  min-height: 56px;
}

.bottom-nav__item:hover {
  color: var(--nav-selected);
  text-decoration: none;
}

.bottom-nav__item.active {
  color: var(--nav-selected);
}

.bottom-nav__icon {
  width: 24px;
  height: 24px;
}

/* ── Drawer sidebar ───────────────────────────────────────── */
/* Matches DrawerThemeData: topRight + bottomRight radius=16 */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  border-top-right-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow-y: auto;
  transition: transform var(--transition), background-color var(--transition);
}

.drawer--hidden {
  transform: translateX(-100%);
}

.drawer__header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--divider-color);
}

.drawer__nav {
  padding: 0.5rem 0;
  list-style: none;
}

.drawer__nav-item a {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 400;
  transition: background-color var(--transition), color var(--transition);
}

.drawer__nav-item a:hover,
.drawer__nav-item a.active {
  background-color: rgba(51,102,153,0.1);
  color: var(--color-primary);
}

/* ── Help / docs specific ─────────────────────────────────── */
.page-hero {
  padding: 3rem 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  text-align: center;
}

.page-hero h1 {
  color: #ffffff;
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Step list (numbered instructions) */
.steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
}

.steps > li {
  counter-increment: step-counter;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.steps > li::before {
  content: counter(step-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 0.125rem;
}

/* Section cards grid */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Image with caption */
.figure {
  margin: 1.5rem auto;
  padding: 8px 0;
  text-align: center;
  max-width: 80%;
}

.figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 8px auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.figure figcaption {
  max-width: 100%;
  margin: 0.5rem auto 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Table of contents */
.toc {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.toc__title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
}

.toc ol,
.toc ul {
  padding-left: 1.25rem;
  margin: 0;
}

.toc li {
  margin-bottom: 0.25rem;
}

.toc a {
  font-size: 0.9rem;
  color: var(--color-primary);
}

/* ── Data table ───────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th {
  text-align: left;
  padding: 0.625rem 0.875rem;
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--divider-color);
}

td {
  padding: 0.625rem 0.875rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--divider-color);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: var(--bg-surface-alt);
}

/* ── Divider ──────────────────────────────────────────────── */
/* Matches DividerThemeData: space=1, thickness=1, no indent */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--divider-color);
  border: none;
  margin: 0;
}

/* ── Utility classes ──────────────────────────────────────── */
.text-primary   { color: var(--color-primary) !important; }
.text-active    { color: var(--color-active)  !important; }
.text-accent    { color: var(--color-accent)  !important; }
.text-muted     { color: var(--text-secondary) !important; }
.text-center    { text-align: center; }
.text-right     { text-align: right; }

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 0.25rem; }
.mt-2  { margin-top: 0.5rem; }
.mt-4  { margin-top: 1rem; }
.mt-8  { margin-top: 2rem; }

.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 0.25rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-8  { margin-bottom: 2rem; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.flex-wrap      { flex-wrap: wrap; }

.hidden         { display: none !important; }
.sr-only        { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.25rem;  }

  .site-nav { display: none; }

  .section-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 2rem 0;
  }

  .page-hero h1 {
    font-size: 1.625rem;
  }

  .drawer {
    width: 280px;
  }
}

@media (max-width: 480px) {
  .btn--lg {
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
  }

  .container {
    padding: 0 1rem;
  }
}

/* ── Help header (minimal) ────────────────────────────────── */
.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 0.75rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--divider-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.help-header-logo {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  color: var(--color-primary);
  font-size: 0.9375rem;
  font-weight: 500;
}

.help-header-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* ── Language picker ──────────────────────────────────────── */
.lang-picker {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: auto;
  padding-inline-start: 0.5rem;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid transparent;
  min-width: 32px;
  min-height: 28px;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.lang-btn:hover {
  color: var(--color-primary);
  background-color: rgba(51, 102, 153, 0.08);
  text-decoration: none;
}

.lang-btn.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  pointer-events: none;
}

/* ── Help close / back button ─────────────────────────────── */
.help-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.625rem;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 0.9375rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  transition: color var(--transition), background-color var(--transition);
}

.help-close-btn:hover {
  color: var(--color-primary);
  background-color: var(--bg-surface-alt);
}

.help-close-btn--x span { display: none; } /* X button shows icon only */

/* ── Help footer (minimal) ────────────────────────────────── */
.help-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 0.75rem;
  border-top: 1px solid var(--divider-color);
  margin-top: 3rem;
}

.help-footer-copy {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ── Help content area ────────────────────────────────────── */
.help-content {
  width: min(100%, 1100px);
  padding: 2rem max(1.25rem, env(safe-area-inset-right)) 2rem max(1.25rem, env(safe-area-inset-left));
}

.help-content > * + * {
  margin-top: 1rem;
}

.help-content ul,
.help-content ol {
  padding-left: 2rem;
  margin: 0.75rem 0 1.25rem 0;
}

.help-content li {
  padding-left: 0.25rem;
  margin-bottom: 0.5rem;
}

.help-content li::marker {
  color: var(--color-primary);
}

.help-content li > ul,
.help-content li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* ── Images — 66 % of natural size, centered at 80 % max ─── */
/* JS in loader.js sets the exact pixel width from naturalWidth.
   This CSS provides a clean baseline for no-JS and during load. */
main img {
  display: block;
  width: auto;
  max-width: 80%;
  height: auto;
  margin: 8px auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

/* ── Topic card links on the home page ───────────────────── */
.help-topic-card {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.help-topic-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--text-primary);
}

.help-topic-card h2 {
  font-size: 1.0625rem;
  color: var(--color-primary);
  margin-bottom: 0.375rem;
}

/* ── Open-in-app deep link pill ──────────────────────────── */
.open-in-app {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 1rem;
  background-color: var(--color-primary);
  color: var(--text-on-primary) !important;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: background-color var(--transition), opacity var(--transition);
  margin-bottom: 1rem;
}

.open-in-app:hover {
  background-color: var(--color-primary-dark);
  text-decoration: none !important;
  color: var(--text-on-primary) !important;
}

/* ── Japanese font override ───────────────────────────────── */
:lang(ja) {
  font-family: 'Noto Sans JP', 'Roboto', system-ui, -apple-system, sans-serif;
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .help-header,
  .help-footer,
  .help-close-btn { display: none !important; }

  body {
    background: #fff;
    color: #000;
  }

  a { color: #336699; text-decoration: underline; }
  pre, code { border: 1px solid #ccc; }
}


