/* imuimu cloud, look "Okra" v1.0, 24 Oct 2026. Owner, 24 Oct: "can this system follow the design look and feel of okra
   for now? using okra fonts, design language, etc." and then "Copy Okra for now". A one-off exception to house
   brand separation, until the owner says otherwise: the staff desk (cloud.imuimu.com) wears Okra's faces, its default
   Sky palette, shapes and motion. The members' portal and the machine screen keep imuimu's own look, and the imuimu
   logo stays as supplied. Source: Okra brand pack v1.4 (~/work/mail/okra/web/src/brand/okra.css, 2026-10-05) and its
   app.css / forms.css. Light and Dark (27 Oct 2026, owner: three themes on one button): the Light palette above, and a Dark
   palette taken from Okra's own dark block for the Sky palette (okra.css, :root[data-palette="sky"][data-theme="dark"]),
   in the dark block that follows the tokens. Dark applies on screen only, where early.js put data-theme="dark" on <html>.
   Switch: LOOK in app.py ('okra' wears this file; '' is imuimu's own Sky look). Loaded after each shell's own sheets
   by templates/_look.html; every rule is under html[data-look="okra"], so nothing here applies with the switch off.
   Fonts: Plus Jakarta Sans, Atkinson Hyperlegible Next and Mono, the woff2 files Okra self-hosts (SIL OFL 1.1). */

@font-face { font-family: "Okra Display"; font-weight: 600; font-display: swap; src: url("/static/fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Okra Display"; font-weight: 700; font-display: swap; src: url("/static/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Okra Display"; font-weight: 800; font-display: swap; src: url("/static/fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Okra Body"; font-weight: 400; font-display: swap; src: url("/static/fonts/desk-text-400.woff2") format("woff2"); }
@font-face { font-family: "Okra Body"; font-weight: 400; font-style: italic; font-display: swap; src: url("/static/fonts/desk-text-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Okra Body"; font-weight: 700; font-display: swap; src: url("/static/fonts/desk-text-700.woff2") format("woff2"); }
@font-face { font-family: "Okra Mono"; font-weight: 400; font-display: swap; src: url("/static/fonts/desk-mono-400.woff2") format("woff2"); }
@font-face { font-family: "Okra Mono"; font-weight: 600; font-display: swap; src: url("/static/fonts/desk-mono-600.woff2") format("woff2"); }

/* ---------------------------------------------------------------- tokens: both token sets the desk uses
   static/faces/sky/tokens.css (--fd, --ink2 ...) and static/ds/tokens.css (--font-body, --ink-2, --cobalt ...).
   The two share --ground, --surface, --ink, --line and the semantic inks. Contrast is checked in tests/test_look_okra.py. */
:root[data-look="okra"] {
  /* Okra's own palette values (Sky, its default look) */
  --ok-accent: #C5E2F8;       /* pale sky: the New button, the active icon */
  --ok-accent-ink: #0C2742;
  --ok-shadow: 0 1px 2px rgb(24 39 64 / 7%), 0 4px 14px rgb(24 39 64 / 6%);
  --ok-shadow-lift: 0 2px 4px rgb(24 39 64 / 9%), 0 12px 32px rgb(24 39 64 / 14%);
  --rail-on: var(--ok-accent); --rail-on-ink: var(--ok-accent-ink);   /* the open page on the rail: Okra's active icon */

  /* faces */
  --fd: "Okra Display", system-ui, sans-serif;
  --fb: "Okra Body", system-ui, sans-serif;
  --fm: "Okra Mono", ui-monospace, monospace;
  --font-body: "Okra Body", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-data: "Okra Mono", ui-monospace, monospace;

  /* palette, Sky face names */
  --ground: #F5F7FB; --surface: #FFFFFF; --tint: #D7E5F9; --inset: #EFF3F8;
  --ink: #1C2027; --ink2: #434A55; --ink3: #5B6370;
  --line: #E2E7EE; --line2: #C5CDD9;
  --ctl-edge: #768090;        /* Okra draws fields in --line2; kept >= 3:1 here (WCAG 1.4.11), as the Sky face requires */
  --accent: #1B58BE; --accent2: #8DB4EE; --on-accent: #FFFFFF;
  --good: #1F6B3E; --warn: #8F4A00; --bad: #B3261E;
  --good-bg: #E0F1E6; --warn-bg: #FBEBD9; --bad-bg: #FBE3E1; --off: #5B6370; --off-bg: #EEF1F5; --hold: #1B58BE; --hold-bg: #D7E5F9;
  --bar: #8DB4EE; --bar-t: #1B58BE;
  --c-drinks: #1B58BE;
  --focus-ring: 2px solid #1B58BE; --focus-offset: 2px;

  /* palette, design-system names (the older desk pages and the next shell) */
  --navy: #1C2027;            /* page titles; the logo is an image and keeps its own colours */
  --sky: #C5E2F8; --sky-tint: #D7E5F9; --sky-soft: #EFF3F8;
  --cobalt: #1B58BE; --cobalt-hover: #164A9F; --cobalt-soft: #D7E5F9;
  --surface-2: #EFF3F8;
  --ink-2: #434A55; --ink-3: #5B6370; --line-2: #EEF1F5;
  --on-sky: #0C2742;
  --good-fill: #E0F1E6; --warn-fill: #FBEBD9; --bad-fill: #FBE3E1;
  --info: #1B58BE; --info-fill: #D7E5F9; --neutral: #434A55; --neutral-fill: #EEF1F5;
  --focus: 0 0 0 2px #FFFFFF, 0 0 0 4px #1B58BE;

  /* shape and motion: 12 px cards, 10 px fields, pill buttons and chips, one soft shadow, 140 ms. --r-chip is left alone:
     the Sky face uses it as its small box radius (heat map, notes), the design system as its pill. */
  --r-card: 12px; --r-ctl: 10px;
  --r-card-desk: 12px; --r-control: 10px; --r-control-sm: 10px;
  --shadow: var(--ok-shadow);
  --shadow-card: var(--ok-shadow); --shadow-float: var(--ok-shadow-lift);
  --ease: cubic-bezier(.2, .8, .2, 1); --dur: 140ms;
}
@media (prefers-reduced-motion: reduce) {
  :root[data-look="okra"] { --dur: 0ms; }
}

/* Dark: Okra's own dark palette (okra.css, palette "sky"), in the desk's token names. Screen only, so print stays light.
   Mapping: ground = --ground, surface = --surface, surface-2 = --inset, accent-soft = --tint, ink/ink-2/ink-3, line/line-2,
   action = --accent (links, buttons), action-ink = --on-accent, accent (the compose pill) = --ok-accent, accent-ink = --ok-accent-ink,
   good/warn/bad and their soft fills. Every token the Light block sets is set again, because that block outranks the Sky face's Dark set. */
@media screen {
  :root[data-look="okra"][data-theme="dark"] {
    --ok-accent: #1C4B77; --ok-accent-ink: #DCEBFB;
    --ok-shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 4px 14px rgb(0 0 0 / 30%);
    --ok-shadow-lift: 0 2px 4px rgb(0 0 0 / 45%), 0 12px 32px rgb(0 0 0 / 45%);
    --ground: #10141A; --surface: #191E25; --tint: #1B3350; --inset: #222831;
    --ink: #E4E9F0; --ink2: #BAC3CF; --ink3: #939CA9;
    --line: #29303A; --line2: #3C4451;
    --ctl-edge: #7D8798;
    --accent: #9BC3F5; --accent2: #4F7FB8; --on-accent: #0A2748;
    --good: #7BD39C; --warn: #F2A763; --bad: #F4948B;
    --good-bg: #1B3226; --warn-bg: #3A2716; --bad-bg: #3D1F1C; --off: #939CA9; --off-bg: #222831; --hold: #9BC3F5; --hold-bg: #1B3350;
    --bar: #4F7FB8; --bar-t: #9BC3F5;
    --c-drinks: #6AA8EE;
    --focus-ring: 2px solid #9BC3F5;
  }
}

html[data-look="okra"] body { line-height: 1.5; }
html[data-look="okra"] ::selection { background: var(--ok-accent); color: var(--ok-accent-ink); }
html[data-look="okra"] :focus-visible { border-radius: 6px; }

/* ---------------------------------------------------------------- Sky face shell (templates/faces/sky/base.html) */
html[data-look="okra"] h1, html[data-look="okra"] .h1 { font-weight: 700; }
html[data-look="okra"] .tile-v { font-weight: 700; }
/* search: Okra's borderless grey pill, white while typing */
html[data-look="okra"] .search { border-color: transparent; background: var(--inset); color: var(--ink3); }
html[data-look="okra"] .search:focus-within { background: var(--surface); }
html[data-look="okra"] .search input::placeholder { color: var(--ink3); }
html[data-look="okra"] .search-field { background: var(--surface); }
/* New: Okra's compose button, pale sky with its own ink, lifts on hover */
html[data-look="okra"] .new { background: var(--ok-accent); color: var(--ok-accent-ink); box-shadow: none; font-weight: 700;
  transition: box-shadow var(--dur) var(--ease); }
html[data-look="okra"] .new:hover { background: var(--ok-accent); box-shadow: var(--ok-shadow-lift); }
html[data-look="okra"] .new .ic { color: inherit; }
/* left rail: Okra weights, plain rows at 400, the open page bold on the pale sky pill (--rail-on) */
html[data-look="okra"] .nrow, html[data-look="okra"] .sub { font-weight: 400; }
html[data-look="okra"] .nrow[aria-current="page"], html[data-look="okra"] .sub[aria-current="page"],
html[data-look="okra"] .nav-panels .nrow[aria-pressed="true"] { font-weight: 700; }
html[data-look="okra"] .sidepanel { box-shadow: var(--ok-shadow); }
/* buttons: pill, bold; the plain button is ink on white with a grey edge */
html[data-look="okra"] .btn { border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
html[data-look="okra"] .btn:active:not([disabled]) { transform: scale(.98); }
html[data-look="okra"] .btn.p:hover { background: var(--accent); filter: brightness(1.15); }
html[data-look="okra"] .btn.s { color: var(--ink); border-color: var(--line2); }
html[data-look="okra"] .btn.s:hover { background: var(--inset); }
html[data-look="okra"] .btn.q { color: var(--ink2); }
html[data-look="okra"] .btn.q:hover { background: var(--inset); }
html[data-look="okra"] .tag, html[data-look="okra"] .chip { border-radius: 999px; }
html[data-look="okra"] .chip { font-weight: 700; }
html[data-look="okra"] .row-name, html[data-look="okra"] .card-h { font-weight: 700; }
html[data-look="okra"] .menu { padding: 6px; border: 1px solid var(--line); box-shadow: var(--ok-shadow-lift); }
html[data-look="okra"] .menu a, html[data-look="okra"] .menu button { border-radius: 8px; }
html[data-look="okra"] .card { border-color: var(--line); }

/* ---------------------------------------------------------------- design-system shells (ops_base_ds.html, next/base.html) */
html[data-look="okra"] .sb-nav a { border-radius: 0 999px 999px 0; font-weight: 400; }
html[data-look="okra"] .sb-nav a.on, html[data-look="okra"] .sb-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
html[data-look="okra"] .sb-nav a.on .i, html[data-look="okra"] .sb-nav a[aria-current="page"] .i { color: var(--ink); }
html[data-look="okra"] .desk .btn:not(.icon), html[data-look="okra"] .nx .btn:not(.icon) { border-radius: 999px; }
html[data-look="okra"] .desk .btn.s, html[data-look="okra"] .nx .btn.s { color: var(--ink); border-color: var(--line2); }
html[data-look="okra"] .desk .btn.s:hover, html[data-look="okra"] .nx .btn.s:hover { background: var(--surface-2); }
