/* ============================================================================
   Faden v2 · Recommended direction (base C «Nítido institucional») · tokens.css
   Mockup 17-10-2026 · datos ficticios. Each page links this file first and
   styles.css second (<link rel="stylesheet">, relative paths).

   Values: COMPARISON.md §3 (ramps §3.2, semantic tokens §3.3, icon-tile tints
   §3.4, radii and elevation §3.5, type §3.6, shell §3.7, stitches §3.8).
   This is the only file that holds colour literals; styles.css reads tokens.
   ============================================================================ */
:root {
  /* ---- Ramps (COMPARISON §3.2), 50 → 950 ------------------------------- */

  /* Primary (Faden teal): links, icons, focus, info states, stitches. */
  --fd-primary-50:  #EDF9FE;
  --fd-primary-100: #DAF2FA;
  --fd-primary-200: #B8E3F3;
  --fd-primary-300: #8CCEE5;
  --fd-primary-400: #58B0CD;
  --fd-primary-500: #2492B1;
  --fd-primary-600: #007692; /* focus ring, stitches, subtab underline (5,24:1 on white) */
  --fd-primary-700: #005F76; /* links, monochrome icons (7,24:1 on white) */
  --fd-primary-800: #004A5D;
  --fd-primary-900: #003847;
  --fd-primary-950: #00222D;

  /* Gray (cool): canvas, hairlines, text. */
  --fd-gray-50:  #F5F7F8;
  --fd-gray-100: #EAEDEF;
  --fd-gray-200: #D6DCDF; /* decorative hairline */
  --fd-gray-300: #BCC4C8;
  --fd-gray-400: #9BA5AA;
  --fd-gray-500: #7B878D; /* control borders (3,69:1 on white) */
  --fd-gray-600: #616C72; /* separators « › » « · » (5,39:1) */
  --fd-gray-700: #4C575D; /* muted text (7,42:1) */
  --fd-gray-800: #3A4449;
  --fd-gray-900: #2A3338;
  --fd-gray-950: #181F23; /* text and every figure (16,68:1) */

  /* Success: «al día», «Satisfecho», «Aprobada» only. */
  --fd-success-50:  #ECFBF2;
  --fd-success-100: #D8F6E3;
  --fd-success-200: #B4E9C9;
  --fd-success-300: #89D7AA;
  --fd-success-400: #59BA86;
  --fd-success-500: #309B67;
  --fd-success-600: #177E50;
  --fd-success-700: #0E653F; /* 6,66:1 on success-50 */
  --fd-success-800: #094F31;
  --fd-success-900: #083C24;
  --fd-success-950: #022514;

  /* Warning: waiting states and every overdue element. */
  --fd-warning-50:  #FFF5EA;
  --fd-warning-100: #FFE9D0;
  --fd-warning-200: #FED29C;
  --fd-warning-300: #F1B66B;
  --fd-warning-400: #D59439;
  --fd-warning-500: #B47607;
  --fd-warning-600: #915E01; /* overdue 3 px rule (5,12:1 on warning-50) */
  --fd-warning-700: #754B01; /* overdue text and icon (7,06:1 on warning-50) */
  --fd-warning-800: #5C3A01;
  --fd-warning-900: #462B00;
  --fd-warning-950: #2C1900;

  /* Accent (action red, VIS2-D3): the one filled primary button, the 3 px active-nav bar,
     the 2 px selected record-tab underline, checked controls. Nothing else (COMPARISON §3.1). */
  --fd-accent-50:  #FFF4F2;
  --fd-accent-100: #FFE6E3;
  --fd-accent-200: #FFCDC7;
  --fd-accent-300: #FFA89E;
  --fd-accent-400: #F27A6F;
  --fd-accent-500: #DA5047;
  --fd-accent-600: #B8342F; /* OKLCH h 27,0°, L 0,525 · white 5,88:1 */
  --fd-accent-700: #972622; /* white 8,03:1 */
  --fd-accent-800: #771D1A; /* white 10,63:1 */
  --fd-accent-900: #5A1613;
  --fd-accent-950: #3A0B09;

  /* Danger (crimson, F21): form errors only, never filled. */
  --fd-danger-50:  #FFF1F4;
  --fd-danger-100: #FFE3EA;
  --fd-danger-200: #FCC6D4;
  --fd-danger-300: #F59AB2;
  --fd-danger-400: #E5658B;
  --fd-danger-500: #C63A67;
  --fd-danger-600: #9A1A47; /* OKLCH h 6,6°, L 0,453 · 20,4° from accent-600 · 8,04:1 on white */
  --fd-danger-700: #7D1439; /* 10,34:1 on white, 9,42:1 on danger-50 */
  --fd-danger-800: #620F2C;
  --fd-danger-900: #490A20;
  --fd-danger-950: #2E0513;

  /* Aliases kept for the shell: the action ramp is the accent ramp. */
  --fd-action-600: var(--fd-accent-600);
  --fd-action-700: var(--fd-accent-700);
  --fd-action-800: var(--fd-accent-800);

  /* Institution navy, once per screen (sidebar footer bar). */
  --fd-inst-primary: #002E5D; /* white 13,56:1 */

  /* Two new tile pairs (COMPARISON §3.4, VIS2-D8 (b)): Entrevistas/actas blue, Situaciones plum. */
  --fd-blue-50:  #E8F0FE;
  --fd-blue-700: #1D4F91;
  --fd-plum-50:  #F3EFF9;
  --fd-plum-700: #6B4E9B;

  /* ---- Semantic tokens (COMPARISON §3.3) -------------------------------- */

  /* Surfaces and text. */
  --fd-bg: var(--fd-gray-50);             /* page canvas */
  --fd-surface: #FFFFFF;                  /* cards, record header, topbar */
  --fd-surface-clear: rgb(255 255 255 / 0); /* transparent end of the scroller edge fade */
  --fd-surface-sunken: var(--fd-gray-50); /* table headers, sunken cells, sidebar */
  --fd-text: var(--fd-gray-950);          /* text and every figure */
  --fd-text-muted: var(--fd-gray-700);    /* labels, meta, provenance */
  --fd-text-subtle: var(--fd-gray-600);   /* separators */
  --fd-text-inverse: #FFFFFF;             /* text on the action fill and on navy */

  /* Borders. */
  --fd-border-hairline: var(--fd-gray-200); /* cards, rows (decorative) */
  --fd-border-control: var(--fd-gray-500);  /* controls, timeline rail */

  /* Action, links, focus. */
  --fd-action: var(--fd-accent-600);          /* primary button fill */
  --fd-action-hover: var(--fd-accent-700);    /* primary button hover */
  --fd-action-active: var(--fd-accent-800);   /* primary button pressed */
  --fd-action-marker: var(--fd-accent-600);   /* 3 px active nav bar, 2 px selected record-tab underline */
  --fd-secondary: var(--fd-primary-600);      /* secondary outline border */
  --fd-secondary-text: var(--fd-primary-700); /* secondary outline text */
  --fd-link: var(--fd-primary-700);           /* links */
  --fd-link-hover: var(--fd-primary-900);     /* link hover */
  --fd-focus-ring: var(--fd-primary-600);     /* 2 px ring, offset 2 (5,24:1 white, 4,88:1 gray-50) */
  --fd-focus-ring-on-dark: #7FD6EE;           /* focus on the navy bar (8,24:1 on #002E5D, 7,70:1 on #003847) */
  --fd-subtab-marker: var(--fd-primary-600);  /* publication subtab underline (F19), never red */
  --fd-stitch: var(--fd-primary-600);         /* five-stitch brand mark (§3.8) */

  /* Icons and figures. */
  --fd-icon: var(--fd-primary-700); /* monochrome icon in text context */
  --fd-figure: var(--fd-text);      /* figures are never coloured */

  /* Overdue (warning family, never red). */
  --fd-overdue-text: var(--fd-warning-700);
  --fd-overdue-bg: var(--fd-warning-50);
  --fd-overdue-border: var(--fd-warning-600);

  /* Errors (crimson danger, never filled). */
  --fd-error-text: var(--fd-danger-700);
  --fd-error-border: var(--fd-danger-600);
  --fd-error-bg: var(--fd-danger-50);

  /* State chips: text + icon + surface; colour is never the only carrier. */
  --fd-state-neutral-fg: var(--fd-gray-700);    --fd-state-neutral-bg: var(--fd-gray-100);   --fd-state-neutral-border: var(--fd-gray-200);
  --fd-state-info-fg: var(--fd-primary-700);    --fd-state-info-bg: var(--fd-primary-50);    --fd-state-info-border: var(--fd-primary-200);
  --fd-state-success-fg: var(--fd-success-700); --fd-state-success-bg: var(--fd-success-50); --fd-state-success-border: var(--fd-success-200);
  --fd-state-waiting-fg: var(--fd-warning-700); --fd-state-waiting-bg: var(--fd-warning-50); --fd-state-waiting-border: var(--fd-warning-200);

  /* Proposal blocks («◇ Propuesta») only. */
  --fd-place-warm: #FCF5EA;
  --fd-proposal-border: var(--fd-gray-600); /* dotted */

  /* Sidebar. */
  --fd-nav-bg: var(--fd-gray-50);          /* light sidebar and drawer (VIS2-D17 (a)) */
  --fd-nav-hover-bg: var(--fd-gray-100);   /* item hover */
  --fd-nav-active-bg: var(--fd-surface);   /* active item = white card + 3 px accent bar */
  --fd-inst-text-2: var(--fd-primary-100); /* second line on the navy bar (11,66:1) */

  /* ---- Icon-tile tints (COMPARISON §3.4): the tile is the only place a family tint appears ---- */
  --fd-tile-plan-bg: var(--fd-primary-50);      --fd-tile-plan-fg: var(--fd-primary-700);      /* Plan, objetivos, actividades, requisitos · 6,76:1 */
  --fd-tile-interview-bg: var(--fd-blue-50);    --fd-tile-interview-fg: var(--fd-blue-700);    /* Entrevistas and actas · 7,10:1 */
  --fd-tile-situation-bg: var(--fd-plum-50);    --fd-tile-situation-fg: var(--fd-plum-700);    /* Situaciones · 5,81:1 */
  --fd-tile-academic-bg: var(--fd-gray-100);    --fd-tile-academic-fg: var(--fd-gray-700);     /* Académico, exported data (neutral) · 6,31:1 */
  --fd-tile-neutral-bg: var(--fd-gray-100);     --fd-tile-neutral-fg: var(--fd-gray-700);      /* movimientos, contacto, síntesis · 6,31:1 */
  --fd-tile-overdue-bg: var(--fd-warning-50);   --fd-tile-overdue-fg: var(--fd-warning-700);   /* state: overdue · 7,06:1 */
  --fd-tile-waiting-bg: var(--fd-warning-50);   --fd-tile-waiting-fg: var(--fd-warning-700);   /* state: waiting · 7,06:1 */
  --fd-tile-ok-bg: var(--fd-success-50);        --fd-tile-ok-fg: var(--fd-success-700);        /* state: al día · 6,66:1 */
  --fd-tile-draft-bg: var(--fd-gray-100);       --fd-tile-draft-fg: var(--fd-gray-700);        /* state: draft · 6,31:1 */
  --fd-tile-progress-bg: var(--fd-primary-50);  --fd-tile-progress-fg: var(--fd-primary-700);  /* state: in progress · 6,76:1 */

  /* ---- Radii and elevation (COMPARISON §3.5) ---------------------------- */
  --fd-radius-card: 8px;    /* cards, record header */
  --fd-radius-control: 6px; /* buttons, icon tiles, avatars */
  --fd-radius-badge: 4px;   /* chips, badges, decision markers */
  --fd-radius-pill: 999px;  /* enrolment pill */
  --fd-shadow-color: rgb(24 31 35 / 0.14);                  /* the one shadow colour */
  --fd-shadow-card: none;                                   /* cards carry no shadow */
  --fd-shadow-popover: 0 8px 20px var(--fd-shadow-color);   /* drawer and decision popovers only */
  --fd-backdrop: rgb(24 31 35 / 0.40);                      /* scrim behind the open drawer */

  /* ---- Motion (COMPARISON §3.7): hover and focus only -------------------- */
  --fd-motion-fast: 150ms;
  --fd-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* ---- Type (COMPARISON §3.6), size/line-height pairs -------------------- */
  --fd-font: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fd-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; /* attendance codes */
  --fd-text-figure: 32px/36px; /* stat figures 700 tabular-nums */
  --fd-text-h1: 24px/30px;     /* student name 600, one per screen */
  --fd-text-h2: 18px/24px;     /* card titles 600, with the icon tile */
  --fd-text-body: 15px/22px;   /* body */
  --fd-text-table: 14px/20px;  /* compact tables */
  --fd-text-meta: 13px/18px;   /* labels, provenance, sub-lines */
  --fd-text-floor: 12.5px/16px; /* table headers, decision markers, footer, nav group labels (600) */

  /* Icon sizes. */
  --fd-icon-nav: 20px;    /* sidebar */
  --fd-icon-panel: 18px;  /* inside a 28 px tile */
  --fd-icon-inline: 16px; /* chips, meta, ledger rows */
  --fd-tile: 28px;        /* icon tile */

  /* Shell geometry (COMPARISON §3.7). */
  --fd-sidebar-w: 248px;    /* light sidebar */
  --fd-topbar-h: 56px;
  --fd-gutter: 24px;        /* 16 px below 1024 */
  --fd-gap: 16px;           /* card gap */
  --fd-card-pad: 16px;      /* card padding */
  --fd-card-head-h: 44px;   /* card head */
  --fd-target: 44px;        /* minimum target below 1024 */
  --fd-content-max: 1320px;
}
