/* ============================================================
   nori design tokens · v2.0
   Source of truth: the nori-design skill (SKILL.md next to this file)
   and the nori-theming skill (color law). Specimen:
   https://claude.ai/code/artifact/dd83852f-458f-44d2-94df-1bab20e8d913

   Usage in a site repo:
     1. Copy this file into the site (do not hotlink across repos).
     2. Load fonts in <head> BEFORE this stylesheet:
        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Newsreader:ital,opsz,wght@1,6..72,300..600&display=swap" rel="stylesheet">
     3. <link rel="stylesheet" href="design-tokens.css">

   There is no light theme.
   ============================================================ */

:root {
  color-scheme: dark;

  /* ---- structural ramp (IBM Carbon / oxocarbon descent) ---- */
  --deep:    #0e0e0e;  /* marketing page canvas */
  --base:    #161616;  /* product UI canvas, panels on marketing */
  --surface: #1c1c1c;  /* raised surfaces, bars */
  --overlay: #262626;  /* primary hairlines, borders */
  --subtle:  #393939;  /* nested borders, schematic boxes */
  --muted:   #525252;  /* disabled, placeholder (sub-AA by design) */
  --comment: #8a8f98;  /* secondary text, labels        5.6:1 AA  */
  --text:    #dde1e6;  /* body                         13.8:1 AAA */
  --fg:      #f2f4f8;  /* headings, emphasis           16.4:1 AAA */

  /* ---- functional (normal / bright) ---- */
  --green:          #42be65;  --green-bright:   #6fdc8c;  /* THE brand accent */
  --red:            #f47067;  --red-bright:     #ff9cac;
  --yellow:         #f2cc60;  --yellow-bright:  #fddc69;
  --blue:           #78a9ff;  --blue-bright:    #a6c8ff;
  --magenta:        #be95ff;  --magenta-bright: #d4b0ff;
  --cyan:           #08bdba;  --cyan-bright:    #3ddbd9;
  --selection:      #2a3b2e;
  --focus:          rgba(66, 190, 101, .5);

  /* ---- typography ---- */
  --mono:  'IBM Plex Mono', ui-monospace, Menlo, monospace;   /* voice A: the machine */
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;   /* voice B: the author (italic display only) */

  /* type scale */
  --fs-display: clamp(46px, 6.6vw, 82px); /* Newsreader italic 420, lh 1.03 */
  --fs-pull:    30px;                     /* Newsreader italic 380, lh 1.2  */
  --fs-h1:      24px;                     /* Plex Mono 600, track -1%       */
  --fs-h2:      17px;                     /* Plex Mono 600                  */
  --fs-body:    15px;                     /* Plex Mono 400, lh 1.75, <=62ch */
  --fs-small:   13px;
  --fs-label:   11px;                     /* Plex Mono 500, caps, track +9% */

  /* ---- structure ---- */
  --hair:        1px solid var(--overlay);
  --hair-nested: 1px solid var(--subtle);
  --radius-btn:  6px;
  --radius-tag:  4px;

  /* spacing: 4px base — 8 / 16 / 24 / 32 / 48 / 72 / 96 */
  --sp-2: 8px; --sp-4: 16px; --sp-6: 24px; --sp-8: 32px;
  --sp-12: 48px; --sp-18: 72px; --sp-24: 96px;

  /* ---- motion law ---- */
  --t-hover: .12s linear;       /* hover/focus transitions */
  --t-blink: 1.1s;              /* cursor blink, steps(1)  */
  --t-marquee: 36s;             /* carousel drift, linear  */
}

/* ============ base ============ */
body {
  background: var(--deep);
  color: var(--text);
  font-family: var(--mono);
  font-size: var(--fs-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}
::selection { background: var(--selection); color: var(--fg); }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-bright); text-decoration: underline; text-underline-offset: 3px; }
a:visited { color: var(--magenta); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { color: var(--fg); margin: 0; text-wrap: balance; }
code, kbd, pre { font-family: var(--mono); }
code {
  background: var(--overlay); border: var(--hair-nested);
  border-radius: var(--radius-tag); padding: 1px 6px; font-size: 13px; color: var(--fg);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto !important; }
}

/* ============ display type ============ */
.t-display {
  font-family: var(--serif); font-style: italic; font-weight: 420;
  font-size: var(--fs-display); line-height: 1.03; letter-spacing: -.015em; color: var(--fg);
}
.t-pull {
  font-family: var(--serif); font-style: italic; font-weight: 380;
  font-size: var(--fs-pull); line-height: 1.2; color: var(--fg);
}
.label {
  font-size: var(--fs-label); font-weight: 500; letter-spacing: .09em;
  text-transform: uppercase; color: var(--comment);
}
.eyebrow-flag { font-size: 13px; font-weight: 500; color: var(--comment); }
.eyebrow-flag b { color: var(--green); font-weight: 500; }

/* ============ wordmark ============ */
.wordmark { color: var(--fg); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.wordmark .prompt { color: var(--green-bright); }
.cursor {
  display: inline-block; width: .55em; height: 1.05em; margin-left: 2px;
  background: var(--green-bright); vertical-align: text-bottom;
  animation: nori-blink var(--t-blink) steps(1) infinite;
}
@keyframes nori-blink { 50% { opacity: 0; } }

/* ============ buttons ============ */
button, .btn {
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  border-radius: var(--radius-btn); padding: 9px 16px; cursor: pointer;
  border: 1px solid transparent; display: inline-flex; align-items: center; gap: 9px;
  line-height: 1.2; transition: background-color var(--t-hover), color var(--t-hover);
}
.btn-primary { background: var(--green); color: var(--base); }
.btn-primary:hover { background: var(--green-bright); }
.btn-primary kbd { background: rgba(14,14,14,.18); color: var(--base); }
.btn-secondary { background: var(--overlay); color: var(--text); }
.btn-secondary:hover { background: var(--subtle); }
.btn-secondary kbd { background: var(--base); color: var(--comment); border: var(--hair-nested); }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: rgba(66,190,101,.1); }
.btn-destructive { background: var(--red); color: var(--base); }
.btn-destructive:hover { background: var(--red-bright); }
kbd { font-size: 11px; padding: 1.5px 6px; border-radius: var(--radius-tag); }

/* ============ inputs ============ */
input[type="text"], input[type="email"], textarea {
  font-family: var(--mono); font-size: 14px; color: var(--fg);
  background: var(--base); border: var(--hair-nested);
  border-radius: var(--radius-btn); padding: 9px 12px;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus { border-color: var(--green); outline: none; }
input[aria-invalid="true"] { border-color: var(--red); }

/* ============ callouts — tint bg, bright text, 3px spine ============ */
.callout { padding: 12px 16px; font-size: 13.5px; border-left: 3px solid; }
.callout-success { background: rgba(66,190,101,.09);  border-color: var(--green);  color: var(--green-bright); }
.callout-error   { background: rgba(244,112,103,.09); border-color: var(--red);    color: var(--red-bright); }
.callout-warn    { background: rgba(242,204,96,.09);  border-color: var(--yellow); color: var(--yellow-bright); }
.callout-info    { background: rgba(120,169,255,.09); border-color: var(--blue);   color: var(--blue-bright); }

/* ============ terminal window ============ */
.term { border: var(--hair); background: var(--base); }
.term-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border-bottom: var(--hair);
  padding: 9px 14px; font-size: 12px; color: var(--comment);
}
.term-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--subtle); }
.term-bar .dot-live { background: var(--green); }
.term-bar .title { flex: 1; text-align: center; }
.term-bar .badge { color: var(--green); letter-spacing: .08em; font-size: 10.5px; }
.term-body { padding: 16px 18px 20px; font-size: 13px; line-height: 1.95; overflow-x: auto; white-space: pre; }
.term-body .ps { color: var(--green); }        /* $ prompt         */
.term-body .cmd { color: var(--fg); }          /* typed command    */
.term-body .dim { color: var(--comment); }     /* tool noise       */
.term-body .ok { color: var(--green); }        /* success          */
.term-body .accent { color: var(--green-bright); } /* the win      */
.term-body .warn { color: var(--yellow); }
.term-body .info { color: var(--blue); }
.term-body .add { color: var(--green); }       /* diffstat +       */
.term-body .del { color: var(--red); }         /* diffstat −       */

/* ============ plan tree (personality moment b) ============ */
.plan {
  font-size: 13px; line-height: 1.95; color: var(--text);
  border: var(--hair); background: var(--base); padding: 16px 20px;
  overflow-x: auto; margin: 0;
}
.plan .ok { color: var(--green); }
.plan .todo { color: var(--muted); }

/* ============ carousels ============ */
.marquee { overflow: hidden; border: var(--hair); }
.mq-track { display: flex; width: max-content; animation: nori-mq var(--t-marquee) linear infinite; }
.mq-track.mq-rev { animation-duration: 30s; animation-direction: reverse; }
.marquee:hover .mq-track,
.marquee:focus-within .mq-track { animation-play-state: paused; }
@keyframes nori-mq { to { transform: translate3d(-50%, 0, 0); } }
.mq-group { display: flex; }
.lg { padding: 20px 38px; border-right: var(--hair); color: var(--comment); white-space: nowrap; font-size: 15px; }
.lg:hover { color: var(--fg); background: var(--base); }
.lg svg { height: 22px; width: auto; display: block; fill: currentColor; } /* logos inherit, never brand colors */
.cp { padding: 14px 26px; border-right: var(--hair); color: var(--text); white-space: nowrap;
      font-size: 13.5px; display: flex; gap: 10px; align-items: center; }
.cp i { color: var(--muted); font-style: normal; }
.cp-logo { height: 16px; width: 16px; flex: none; fill: currentColor; color: var(--muted); } /* ACP logos inherit, never brand colors */
.cp:hover { background: var(--base); }
.cp:hover .cp-logo { color: inherit; }
.cp-you { color: var(--green); font-weight: 500; } /* "your own agent" — the strip's only green */
.cp-you .cp-logo { color: inherit; }

/* ============ tables ============ */
.proof-table { width: 100%; border-collapse: collapse; border: var(--hair); font-size: 13.5px; }
.proof-table th, .proof-table td { border: var(--hair); padding: 10px 14px; text-align: left; font-weight: 400; vertical-align: top; }
.proof-table th { color: var(--comment); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* ============ structure helpers ============ */
.hairline { border-top: var(--hair); }
.dim-note { display: flex; align-items: center; gap: 8px; color: var(--comment); font-size: 10.5px; letter-spacing: .04em; }
.dim-note b { flex: 1; border-top: 1px solid var(--subtle); font-weight: 400; }
.dim-note i { width: 1px; height: 9px; background: var(--subtle); flex: none; }
.annot { padding-top: 14px; border-top: 1px dashed var(--subtle); color: var(--comment); font-size: 13px; line-height: 1.8; }
.annot::before { content: '// '; color: var(--muted); }
.table-scroll { overflow-x: auto; }
