/*
 * InternInkStone shared design tokens.
 *
 * Figma Variables below were verified on nodes 139:606 and 155:642 in file
 * ZaggbS0TYv1ljbBzqEwc7h. Font-family and responsive tokens are project-level
 * code decisions recorded in docs/FIGMA_VARIABLES_STYLES_IMPLEMENTATION.md.
 */

@font-face {
  font-family: "InkStone Han Serif SC Home";
  src: url("../assets/fonts/source-han-serif-sc/inkstone-han-serif-sc-home-600.woff2?v=20260825-font2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "InkStone Han Serif SC Home";
  src: url("../assets/fonts/source-han-serif-sc/inkstone-han-serif-sc-home-700.woff2?v=20260825-font2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "InkStone Han Serif SC Common";
  src: url("../assets/fonts/source-han-serif-sc/inkstone-han-serif-sc-common-600.woff2?v=20260825-font2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "InkStone Han Serif SC Common";
  src: url("../assets/fonts/source-han-serif-sc/inkstone-han-serif-sc-common-700.woff2?v=20260825-font2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "InkStone Han Serif SC Extended";
  src: url("../assets/fonts/source-han-serif-sc/inkstone-han-serif-sc-extended-600.woff2?v=20260825-font2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "InkStone Han Serif SC Extended";
  src: url("../assets/fonts/source-han-serif-sc/inkstone-han-serif-sc-extended-700.woff2?v=20260825-font2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Existing core color Variables. */
  --paper: #ffffff;
  --bg: #fdfcf8;
  --ink: #1a2332;
  --ink-soft: #3a4556;
  --bg-soft: #f7f4ec;
  --bg-soft-1: #faf8f2;
  --line: #e8e4d9;
  --muted: #7a8394;
  --muted-2: #a9b0bd;
  --line-soft: #efece2;
  --rule-soft: #efece3;
  --dot: #ebe6da;
  --paper-warm: var(--bg-soft);
  --aux-cyan-3: #40b5bf;
  --aux-violet-2: #be9bd5;
  --aux-mint-4: #259675;
  /*
   * Brand Scale migrated from the approved reference Design System.
   * Numbered tokens are canonical; the existing accent names remain aliases.
   */
  --vermilion-1: #f4f7fb;
  --vermilion-2: #dde7f4;
  --vermilion-3: #b8ceea;
  --vermilion-4: #88addd;
  --vermilion-5: #3f7dcf;
  --vermilion-6: #1554a8;
  --vermilion-7: #0c3c80;
  --accent-soft: var(--vermilion-4);
  --accent-2: var(--vermilion-5);
  --accent: var(--vermilion-6);

  /* Semantic & AI Colors migrated from the same reference section. */
  --success: #6b7a3a;
  --success-soft: #a4ad7e;
  --success-bg: #f1f3e8;
  --success-deep: #4d5826;
  --warning: #a8864b;
  --warning-soft: #cba87b;
  --warning-bg: #f8f1e3;
  --warning-deep: #7a5e2c;
  --error: #c03030;
  --error-soft: #df7878;
  --error-bg: #fdeaea;
  --error-deep: #9a2020;
  --rec-red: #e74c3c;
  --ai-trust-high: var(--success);
  --ai-trust-mid: var(--warning);
  --ai-trust-low: var(--muted);
  --ai-tint: #f5f8fc;
  --ai-tint-rule: #d8e4f3;

  /*
   * Project semantic colors required by the migrated component library.
   * Existing component names now bridge to the imported semantic scale.
   */
  --state-danger: var(--error);
  --state-danger-strong: var(--error-deep);
  --state-success: var(--success-soft);
  --state-warning: var(--warning-soft);
  --state-error: var(--error-soft);

  /* Figma radius Variables. */
  --radius: 4px;
  --radius-card: 8px;
  --12px: 12px;
  --radius-pill: 999px;

  /* Project font-family baseline copied from the approved reference project. */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-serif: "Cormorant Garamond", "Noto Serif SC", serif;
  --font-serif-cjk: "InkStone Han Serif SC Home", "InkStone Han Serif SC Common", "InkStone Han Serif SC Extended", "Source Han Serif SC", "Noto Serif SC", serif;

  /*
   * Responsive code tokens. These are not Figma Variables.
   * Registered breakpoints: compact < 768px; medium 768px-1199px;
   * wide >= 1200px. Media-query conditions stay as literal values because
   * custom properties cannot be used as ordinary media-query conditions.
   */
  --layout-content-max: 1200px;
  --layout-page-gutter: 20px;
  --layout-section-space: 64px;
  --layout-text-measure: 72ch;
}

/*
 * Product dark mode. Core values mirror the approved Design System semantic
 * colors one-to-one. The additional surface and auxiliary values complete
 * code-only colors that do not yet exist as Figma Variables.
 */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1a1815;
  --bg: #1a1815;
  --ink: #ebe6dc;
  --ink-soft: #b8b1a3;
  --bg-soft: #252320;
  --bg-soft-1: #1f1d1a;
  --line: #3a3631;
  --muted: #8a8478;
  --muted-2: #5a554c;
  --line-soft: #3a414c;
  --rule-soft: #353b45;
  --dot: #252729;
  --paper-warm: var(--bg-soft);
  --aux-cyan-3: #69cbd3;
  --aux-violet-2: #c9ace0;
  --aux-mint-4: #54b695;
  --vermilion-1: #151f2c;
  --vermilion-2: #1b2d43;
  --vermilion-3: #294665;
  --vermilion-4: #4f779f;
  --vermilion-5: #aacaf0;
  --vermilion-6: #8db8e9;
  --vermilion-7: #6f9bd2;
  --success: #b7c87d;
  --success-soft: #87965b;
  --success-bg: #242a1c;
  --success-deep: #d2df9b;
  --warning: #e8c27a;
  --warning-soft: #b28a4f;
  --warning-bg: #33291a;
  --warning-deep: #f4d18a;
  --error: #ffb4ab;
  --error-soft: #d37a78;
  --error-bg: #3b2021;
  --error-deep: #ff8a80;
  --rec-red: #ff887a;
  --ai-tint: #172333;
  --ai-tint-rule: #496985;
}

@media (min-width: 768px) {
  :root {
    --layout-page-gutter: 32px;
    --layout-section-space: 80px;
  }
}

@media (min-width: 1200px) {
  :root {
    --layout-page-gutter: 48px;
    --layout-section-space: 96px;
  }
}
