/* AOSC design tokens. 定義元はこのファイルのみ（tokens.css is the single source of
 * design values for the whole theme). Selectors allowed here: `:root` and `@media`
 * only. This file must never style a component. Raw hex values are allowed ONLY
 * here; every other stylesheet must reference var(--aosc-*).
 */

:root{
  /* ===== 2-2 primitives: the navy ramp (7 legacy blues unified into 5 steps) ===== */
  --aosc-navy-50:#EEF0FA;
  --aosc-navy-100:#DDE2F4;
  --aosc-navy-700:#0D198F;   /* brand anchor. Value must not change. */
  --aosc-navy-900:#0A146E;
  --aosc-navy-950:#071033;

  /* ===== 2-2 primitives: paper (warm neutrals) ===== */
  --aosc-paper-0:#FFFFFF;
  --aosc-paper-1:#FAF8F4;
  --aosc-paper-2:#F3EFE7;
  --aosc-paper-3:#E9E2D5;

  /* ===== 2-2 primitives: accent ===== */
  --aosc-accent:#C2410C;          /* 5.18:1 on white */
  --aosc-accent-hover:#9E3410;    /* 7.11:1 on white */
  --aosc-accent-soft:#FBEADF;

  /* ===== 2-4 ink ===== */
  --aosc-ink:#111827;             /* 17.74:1 on white. Value must not change. */
  --aosc-ink-2:#3D4655;
  --aosc-muted:#5B6472;           /* 5.98:1 on white */
  --aosc-accent-ink:#A83A0F;      /* 6.04:1 on paper-1 */
  --aosc-ink-invert:#FFFFFF;
  --aosc-ink-invert-2:rgba(255,255,255,.80);
  --aosc-disabled-ink:#6E7684;

  /* ===== 2-3 grounds ===== */
  --aosc-bg:var(--aosc-paper-1);
  --aosc-surface:var(--aosc-paper-0);
  --aosc-surface-2:var(--aosc-paper-2);
  --aosc-surface-3:var(--aosc-paper-3);
  --aosc-surface-brand:var(--aosc-navy-50);
  --aosc-surface-ink:var(--aosc-navy-950);
  --aosc-surface-accent:var(--aosc-accent);
  --aosc-surface-accent-soft:var(--aosc-accent-soft);

  /* ===== 6-7 status colours (notice backgrounds / inks) ===== */
  --aosc-success-bg:#DCFCE7;      /* with ink 6.49:1 */
  --aosc-success-ink:#166534;
  --aosc-warning-bg:#FEF3C7;      /* with ink 6.37:1 */
  --aosc-warning-ink:#92400E;
  --aosc-danger-bg:#FEE9E7;       /* with ink 5.61:1 */
  --aosc-danger-ink:#B3261E;      /* 6.54:1 on white */

  /* ===== 2-5 focus ===== */
  --aosc-focus:#D8581C;           /* >=3.06:1 on paper-3, the design ceiling */
  --aosc-focus-invert:#FFFFFF;
  --aosc-focus-width:2px;
  --aosc-focus-offset:2px;

  /* ===== 2-6 spacing (4px scale) ===== */
  --aosc-sp-1:4px;
  --aosc-sp-2:8px;
  --aosc-sp-3:12px;
  --aosc-sp-4:16px;
  --aosc-sp-5:20px;
  --aosc-sp-6:24px;
  --aosc-sp-8:32px;
  --aosc-sp-10:40px;
  --aosc-sp-12:48px;
  --aosc-sp-16:64px;
  --aosc-sp-20:80px;
  --aosc-sp-24:96px;

  /* ===== 2-6 layout rhythm ===== */
  --aosc-section-y:clamp(88px,12vw,176px);
  --aosc-block-y:clamp(40px,6vw,80px);
  --aosc-gutter:clamp(20px,5vw,56px);
  --aosc-measure:66ch;
  --aosc-container:1200px;
  /* AFFINGER's own content column (the width common.css gives #contentInner).
   * Shared with the breadcrumb that inc/shell.php injects, so the injected
   * column and the content column cannot drift apart (Visual N1). */
  --aosc-shell-column:min(1180px,calc(100% - 48px));
  --aosc-grid-gap:clamp(16px,2vw,24px);
  --aosc-header-h:80px;

  /* ===== 2-7 radius (6 steps; 22px/24px/28px and 50% are abolished) ===== */
  --aosc-r-0:0;
  --aosc-r-1:2px;
  --aosc-r-2:4px;
  --aosc-r-3:8px;
  --aosc-r-4:12px;
  --aosc-r-full:9999px;

  /* ===== 2-8 lines ===== */
  --aosc-line-soft:#EDE6DA;       /* decorative */
  --aosc-line:#DFD6C7;            /* decorative */
  --aosc-line-strong:#8C8576;     /* functional borders, 3.66:1 */
  --aosc-line-brand:var(--aosc-navy-700);

  /* ===== 2-9 shadows (never #000) ===== */
  --aosc-shadow-0:none;
  --aosc-shadow-1:0 1px 2px rgba(7,16,51,.06);
  --aosc-shadow-2:0 4px 12px rgba(7,16,51,.08);
  --aosc-shadow-3:0 12px 32px rgba(7,16,51,.14);

  /* ===== 2-10 motion and stacking order ===== */
  --aosc-dur-fast:120ms;
  --aosc-dur-base:200ms;
  --aosc-dur-slow:320ms;
  --aosc-ease:cubic-bezier(.2,.6,.2,1);
  --aosc-z-footer-sticky:10010;
  --aosc-z-drawer:10015;
  --aosc-z-learning-bar:10020;
  --aosc-z-modal:10030;
  --aosc-z-skip:10040;
  --aosc-tap-min:44px;

  /* ===== 3-1 font stacks (system fonts only; zero external requests) ===== */
  --aosc-font-heading:"Hiragino Mincho ProN","Yu Mincho","YuMincho","Noto Serif JP","Noto Serif","Songti SC",serif;
  --aosc-font-body:"Hiragino Kaku Gothic ProN","Yu Gothic","YuGothic","Noto Sans JP",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --aosc-font-serif-latin:Georgia,"Times New Roman","Yu Mincho",serif;
  --aosc-font-mono:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;

  /* ===== 3-2 type scale (rem based; 12px is the floor) ===== */
  --aosc-fs-display:clamp(2rem,4.8vw,3.5rem);
  --aosc-fs-h1:clamp(1.75rem,3.6vw,2.75rem);
  --aosc-fs-h2:clamp(1.375rem,2.4vw,2rem);
  --aosc-fs-h3:clamp(1.1875rem,1.75vw,1.5rem);
  --aosc-fs-h4:clamp(1rem,1.4vw,1.25rem);
  --aosc-fs-lead:clamp(1.0625rem,1.4vw,1.1875rem);
  --aosc-fs-body:1rem;
  --aosc-fs-sm:0.875rem;
  --aosc-fs-xs:0.75rem;

  /* ===== 3-3 weights ===== */
  --aosc-fw-normal:400;
  --aosc-fw-medium:500;
  --aosc-fw-bold:700;

  /* ===== 3-4 line heights and letter spacing (negative tracking is banned) ===== */
  --aosc-lh-prose:2.0;
  --aosc-lh-ui:1.5;
  --aosc-lh-xs:1.6;
  --aosc-lh-display:1.15;
  --aosc-lh-heading:1.25;
  --aosc-lh-sub:1.35;
  --aosc-ls-heading:.02em;
  --aosc-ls-display:.01em;
  --aosc-ls-eyebrow:.34em;
  --aosc-ls-badge:.08em;

  /* ===== 2-11 compatibility aliases =====
   * The 7 names the legacy stylesheets already reference. Values point at a
   * semantic token; never write a literal here. */
  --aosc-blue:var(--aosc-navy-700);
  --aosc-red:var(--aosc-danger-ink);      /* legacy #ef3038 had 0 uses; given meaning */
  --aosc-orange:var(--aosc-accent);       /* value moves #ff4b0b -> #C2410C */
  --aosc-text:var(--aosc-ink);
  --aosc-soft:var(--aosc-paper-2);        /* value moves #f7f8fa -> #F3EFE7 */
}

/* AFFINGER narrows the content column to a 28px inset below 1024px
 * (common.css K-3 media override); the shell column follows it. */
@media (max-width:1023.98px){
  :root{--aosc-shell-column:min(1180px,calc(100% - 28px))}
}
