/* CoyLin design tokens — claude.ai-inspired warm palette. Every stylesheet reads these. */
:root {
  color-scheme: light;
  /* Grounds */
  --cy-bg: #faf9f5;
  --cy-surface: #ffffff;
  --cy-well: #f5f4ed;
  --cy-fill: #efede4;
  --cy-fill-2: #e6e3d7;
  --cy-line: #e8e6dc;
  --cy-line-2: #d9d6c9;
  /* Text */
  --cy-fg: #141413;
  --cy-fg-2: #5e5d59;
  --cy-fg-3: #6b6a64; /* >= 4.5:1 on every light ground */
  /* Accent: terracotta, used sparingly */
  --cy-accent: #c96442;
  --cy-accent-hover: #b5573a;
  --cy-accent-text: #ad4f2d;
  --cy-accent-soft: #c964421a;
  --cy-on-accent: #ffffff;
  /* Ink: strongest neutral, for selected states */
  --cy-ink: #141413;
  --cy-on-ink: #faf9f5;
  /* Status */
  --cy-danger: #b93a2f;
  --cy-danger-fill: #b93a2f; /* filled destructive buttons: white text stays >= 4.5:1 */
  --cy-danger-soft: #b93a2f14;
  --cy-warning: #8a5a12;
  --cy-warning-soft: #c9891a1f;
  --cy-success: #2f7a4f;
  /* Elevation */
  --cy-shadow-soft: 0 1px 2px #1414130a, 0 4px 16px -6px #14141314;
  --cy-shadow-lift: 0 1px 2px #1414130a, 0 10px 28px -10px #14141329;
  --cy-shadow-pop: 0 0 0 1px #14141314, 0 12px 32px -8px #1414132e, 0 2px 6px #1414130d;
  /* Button material: a lit top edge, a slightly heavier bottom edge and a contact shadow, so a
     button reads as a raised object; pressing removes the lift and sinks it (inset shade). */
  --cy-btn-top: #ffffff;
  --cy-btn-bottom: #f8f7f2;
  --cy-btn-top-hover: #fdfcf9;
  --cy-btn-bottom-hover: #f2f0e8;
  --cy-btn-press: #eceadf;
  --cy-btn-edge: #d9d6c9;
  --cy-btn-edge-low: #c9c5b5;
  --cy-btn-lift: inset 0 1px 0 #ffffff, 0 1px 1px #14141308, 0 1px 3px #1414130f;
  --cy-btn-sink: inset 0 1px 2px #1414131a;
  --cy-cta-edge: color-mix(in srgb, var(--cy-accent) 78%, #000);
  --cy-cta-top: color-mix(in srgb, var(--cy-accent) 86%, #fff);
  --cy-cta-lift: inset 0 1px 0 #ffffff47, inset 0 -1px 0 #00000014, 0 1px 2px #14141329,
    0 4px 10px -4px color-mix(in srgb, var(--cy-accent) 60%, transparent);
  --cy-cta-sink: inset 0 1px 3px #00000038;
  /* Type */
  --cy-sans: "Instrument Sans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --cy-serif: "Source Serif 4", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --cy-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  /* Shape and layout */
  --cy-r-sm: 8px;
  --cy-r: 10px;
  --cy-r-lg: 16px;
  --cy-r-xl: 18px;
  --cy-header: 60px;
  --cy-max: 1180px;
  --cy-gutter: 24px;
  --cy-control: 34px;
  /* Layers */
  --cy-z-header: 20;
  --cy-z-menu: 40;
  --cy-z-popover: 60;
  --cy-z-toast: 70;
  /* Motion */
  --cy-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --cy-fast: 150ms;
}

:root.dark {
  color-scheme: dark;
  --cy-bg: #262624;
  --cy-surface: #30302e;
  --cy-well: #1f1e1d;
  --cy-fill: #3a3a37;
  --cy-fill-2: #45443f;
  --cy-line: #3c3b37;
  --cy-line-2: #4d4c46;
  --cy-fg: #faf9f5;
  --cy-fg-2: #c2c0b6;
  --cy-fg-3: #a3a29b; /* >= 4.5:1 on dark grounds */
  --cy-accent: #c96442;
  --cy-accent-hover: #d4714f;
  --cy-accent-text: #eca283; /* >= 4.5:1 on accent-soft over dark surfaces */
  --cy-accent-soft: #d977572b;
  --cy-on-accent: #ffffff;
  --cy-ink: #faf9f5;
  --cy-on-ink: #262624;
  --cy-danger: #f08a7e;
  --cy-danger-fill: #b8453a;
  --cy-danger-soft: #f08a7e1f;
  --cy-warning: #e6b265;
  --cy-warning-soft: #e6b26524;
  --cy-success: #7cc49a;
  --cy-shadow-soft: 0 1px 2px #00000040, 0 4px 16px -6px #00000066;
  --cy-shadow-lift: 0 1px 2px #0000004d, 0 12px 32px -10px #0000008c;
  --cy-shadow-pop: 0 0 0 1px #ffffff14, 0 16px 40px -10px #000000a6;
  --cy-btn-top: #3d3d39;
  --cy-btn-bottom: #353532;
  --cy-btn-top-hover: #45453f;
  --cy-btn-bottom-hover: #3c3c38;
  --cy-btn-press: #2e2e2c;
  --cy-btn-edge: #4d4c46;
  --cy-btn-edge-low: #3f3e3a;
  --cy-btn-lift: inset 0 1px 0 #ffffff14, 0 1px 2px #00000059, 0 2px 6px -2px #00000040;
  --cy-btn-sink: inset 0 1px 3px #00000066;
  --cy-cta-edge: color-mix(in srgb, var(--cy-accent) 70%, #000);
  --cy-cta-top: color-mix(in srgb, var(--cy-accent) 84%, #fff);
  --cy-cta-lift: inset 0 1px 0 #ffffff3d, inset 0 -1px 0 #0000001f, 0 1px 2px #00000073,
    0 6px 14px -6px color-mix(in srgb, var(--cy-accent) 50%, transparent);
  --cy-cta-sink: inset 0 1px 3px #00000059;
}

@media (pointer: coarse) {
  :root {
    --cy-control: 40px;
  }
}
@media (max-width: 680px) {
  :root {
    --cy-gutter: 16px;
    --cy-header: 56px;
  }
}
@media (prefers-contrast: more) {
  :root {
    --cy-btn-edge: #8f8b7d;
    --cy-btn-edge-low: #6f6b5e;
    --cy-line: #b9b5a6;
    --cy-line-2: #8f8b7d;
    --cy-fg-2: #3d3c39;
    --cy-fg-3: #56554f;
  }
  :root.dark {
    --cy-btn-edge: #87857e;
    --cy-btn-edge-low: #87857e;
    --cy-line: #6a6862;
    --cy-line-2: #87857e;
    --cy-fg-2: #deddd6;
    --cy-fg-3: #bab9b1;
  }
}
