/* The look of the SIS AI Hub build, from SiS's design system (23 Nov 2026):
   navy carries every word, red marks the logo and the one primary action,
   Prompt for both scripts, white ground. Light only: the dark tokens are
   set to the light values and the theme switch is hidden.

   Our own judgement where the sheet is silent or falls short:
   - Button fill is the sheet's darker red (#c61017, white on it 6.0:1); the
     logo red (#ed1c24, 4.38:1) is too light for labels at our button size.
   - Removing and revoking are outlined in the error colour, never the
     primary red, so the two cannot be mistaken.
   - Inside the portal, text stays at our sizes for tables and forms; the
     sheet's larger scale is for the landing page.
   Every selector starts `:root:root` to win over the portal's own rules. */
@font-face {
  font-family: "Prompt";
  font-weight: 400;
  font-display: swap;
  src: url(fonts/prompt-thai-400-normal.woff2) format("woff2");
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Prompt";
  font-weight: 400;
  font-display: swap;
  src: url(fonts/prompt-latin-400-normal.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Prompt";
  font-weight: 500;
  font-display: swap;
  src: url(fonts/prompt-thai-500-normal.woff2) format("woff2");
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Prompt";
  font-weight: 500;
  font-display: swap;
  src: url(fonts/prompt-latin-500-normal.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Prompt";
  font-weight: 600;
  font-display: swap;
  src: url(fonts/prompt-thai-600-normal.woff2) format("woff2");
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Prompt";
  font-weight: 600;
  font-display: swap;
  src: url(fonts/prompt-latin-600-normal.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root:root,
:root:root[data-theme="dark"],
:root:root:not([data-theme="light"]) {
  --sis-red: #ed1c24;
  --sis-red-fill: #c61017;
  --sis-red-press: #a50d13;
  --sis-navy: #013a51;
  --sis-navy-deep: #00161f;
  --ink: #013a51;
  --ink-raised: #0a4c68;
  --on-ink: #e8f0f3;
  --on-ink-muted: #a9c1cb;
  --bg: #f6f8f9;
  --surface: #ffffff;
  --sunken: #f3f6f7;
  --text: #013a51;
  --muted: #5b6b73;
  --border: #e0e0e0;
  --border-strong: #c9d2d6;
  --error: #b80909;
  --error-bg: #fbeaea;
  --ok: #157f3b;
  --ok-bg: #e7f5ec;
  --radius: 3px;
  --radius-lg: 12px;
  --accent-strong: #013a51;
  --accent-soft: #eaf1f4;
  --accent-ring: rgba(1, 58, 81, 0.28);
  color-scheme: light;
}
:root:root .theme-switch {
  display: none;
}
:root:root body {
  font-family: "Prompt", "Leelawadee UI", Thonburi, system-ui, sans-serif;
  line-height: 1.7;
}
:root:root .main a,
:root:root body > main a,
:root:root footer a {
  color: var(--sis-navy);
}
:root:root .main a:hover,
:root:root body > main a:hover,
:root:root footer a:hover {
  color: #e21d1d;
}
:root:root .nav a {
  color: var(--on-ink-muted);
}

/* The one primary action: red. */
:root:root .button.primary,
:root:root button.primary {
  background: var(--sis-red-fill);
  border-color: var(--sis-red-fill);
  color: #fff;
}
:root:root .button.primary:hover,
:root:root button.primary:hover:not(:disabled) {
  background: var(--sis-red-press);
  border-color: var(--sis-red-press);
  color: #fff;
}
/* Removing and revoking: outlined, in the error colour. */
:root:root button.danger {
  color: var(--error);
  border-color: var(--error);
  background: var(--surface);
}
:root:root button.danger:hover:not(:disabled),
:root:root button.danger.solid {
  background: var(--error-bg);
  border-color: var(--error);
  color: var(--error);
}
:root:root button:focus-visible,
:root:root a:focus-visible,
:root:root input:focus-visible,
:root:root select:focus-visible,
:root:root textarea:focus-visible,
:root:root summary:focus-visible {
  outline: 2px solid var(--sis-navy);
  outline-offset: 2px;
}

/* The bar: white, as SiS's header, so the logo sits on white. */
:root:root .bar {
  background: #ffffff;
  color: var(--sis-navy);
  border-bottom: 1px solid var(--border);
}
:root:root .bar .brand,
:root:root .top .brand {
  color: var(--sis-navy);
}
:root:root .logo {
  height: 38px;
}
:root:root .logo.big {
  height: 57px;
}
:root:root .bar button,
:root:root .bar button:hover:not(:disabled) {
  color: var(--sis-navy);
}
:root:root .bar button:hover:not(:disabled) {
  background: var(--sunken);
}
:root:root .bar button.ghost {
  border-color: var(--border-strong);
}
:root:root .bar .badge.org {
  border-color: var(--border-strong);
  color: var(--sis-navy);
}
:root:root .bar .badge.rank {
  background: var(--sis-navy);
  color: #fff;
}
:root:root .bar a:focus-visible,
:root:root .bar button:focus-visible {
  outline-color: var(--sis-navy);
}

/* The side rail: navy, the current page marked in red. */
:root:root .nav a {
  border-radius: 3px;
}
:root:root .nav a:hover,
:root:root .nav a[aria-current="page"] {
  color: #fff;
}
:root:root .nav a[aria-current="page"] {
  border-left-color: var(--sis-red);
}
:root:root .tab.active,
:root:root .tab.active:hover:not(:disabled) {
  border-bottom-color: var(--sis-red);
  color: var(--sis-navy);
}

/* Boxes: the sheet's faint, neutral shadow. */
:root:root .signin .card {
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}
/* Red is for the one action that completes the task on a screen. Buttons
   that open a form, and the pick among views, are navy: the sheet's
   secondary button. */
:root:root .heading button.primary,
:root:root button.choice.primary {
  background: var(--sis-navy);
  border-color: var(--sis-navy);
}
:root:root .heading button.primary:hover:not(:disabled),
:root:root button.choice.primary:hover:not(:disabled) {
  background: var(--sis-navy-deep);
  border-color: var(--sis-navy-deep);
}
:root:root .signin {
  background: var(--sis-navy);
}

/* ── the landing page ─────────────────────────────────────────────── */
:root:root .top {
  background: #ffffff;
  color: var(--sis-navy);
  box-shadow: 0 0 0 100vmax #ffffff;
}
:root:root .top .button {
  color: var(--sis-navy);
  border-color: var(--border-strong);
}
:root:root .top .button:hover {
  background: var(--sunken);
  border-color: var(--sis-navy);
}
:root:root .top .icon {
  color: var(--sis-navy);
}
:root:root .top a:focus-visible,
:root:root .top button:focus-visible {
  outline-color: var(--sis-navy);
}
:root:root .hero {
  background: var(--sis-navy);
  box-shadow: 0 0 0 100vmax var(--sis-navy);
}
:root:root .hero h1 {
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}
:root:root body > main h2 {
  font-size: 2rem;
  letter-spacing: 0;
  color: var(--sis-navy);
}
:root:root .button {
  border-radius: 3px;
}
:root:root .hero .button:not(.primary) {
  border-color: #ffffff;
  color: #ffffff;
}
:root:root .main a.button.primary,
:root:root .main a.button.primary:hover,
:root:root body > main a.button.primary,
:root:root body > main a.button.primary:hover {
  color: #ffffff;
}
:root:root footer {
  color: var(--muted);
}
