/* Typeface: Google Sans throughout (loaded by each page from Google Fonts).
*/
/* Fibre shared theme — "quiet ledger".
   Loaded last by index.html, teacher.html and parent.html. Restyles colour, type,
   corners and surfaces only. No layout, behaviour or markup is changed here.
   Remove the <link> to this file to go back to the previous look. */

:root {
  /* the apps' existing colour names, re-pointed at the new palette */
  --paper: #F1F2F0;
  --paper-warm: #E8EAE7;
  --white: #FAFAF8;
  --ink: #101820;
  --ink-soft: #4B5762;
  --rule: #D8DBD8;
  --amber: #2D44B8;
  --amber-deep: #2D44B8;
  --green: #2A7253;
  --green-bg: #E1EEE7;
  --red: #A93D2F;
  --red-bg: #F4E1DD;
  --pending-bg: #F3E8D0;

  /* new tokens */
  --fx-rule-strong: #B9BEBA;
  --fx-thread: #2D44B8;
  --fx-thread-bg: #E6E9F7;
  --fx-on-ink: #F7F8F6;
  --fx-warn: #8F5E0C;
  --fx-display: 'Google Sans', 'Google Sans Text', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --fx-ui: 'Google Sans', 'Google Sans Text', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --fx-r: 3px;

  --card-radius: 4px;
  --card-border: #D8DBD8;
  --card-border-hover: #B9BEBA;
  --card-shadow: none;
  --card-shadow-hover: none;
}

/* ---------- type ---------- */
html body, html body button, html body input, html body select, html body textarea {
  font-family: var(--fx-ui);
}
html body { background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
html body h1,
html body .greeting,
html body .nd-headline,
html body .t-hero .greeting,
html body .p-hero .greeting {
  font-family: var(--fx-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
html body .subtitle,
html body .hint { color: var(--ink-soft); }

/* ---------- surfaces: hairlines instead of glass and shadow ---------- */
html body .glass-card,
html body .nd-glass,
html body .panel,
html body .gate-card,
html body .score-form,
html body .roll,
html body .t-module-card,
html body .p-module-card,
html body .p-checkin-card,
html body .mobile-action-card,
html body .mstat,
html body .step,
html body .nd-bento > * {
  background: var(--white);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid var(--rule);
  border-radius: var(--fx-r);
  box-shadow: none;
}
html body .glass-card:hover,
html body .t-module-card:hover,
html body .p-module-card:hover,
html body .mobile-action-card:hover {
  border-color: var(--fx-rule-strong);
  box-shadow: none;
  transform: none;
}
html body .p-checkin-card { border-color: var(--ink); }

/* sign-in screens */
html body #gate .gate-form-side {
  background: var(--paper);
}
html body .gate-card { padding: 36px; max-width: 420px; }
html body .gate-card h1 { font-size: 30px; line-height: 1.1; }
html body .gate-badge-icon {
  border-radius: 0;
  border: 1.5px solid var(--ink);
  background: transparent;
  box-shadow: none;
}
html body .gate-visual { background: var(--ink); }
html body .gate-visual > svg,
html body .gate-visual > div:nth-child(2):has(> svg),
html body .gate-visual > div:first-child:empty { display: none; }
html body .gate-visual .tagline {
  font-family: var(--fx-display);
  font-weight: 500;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-align: left;
  max-width: 14ch;
  color: var(--fx-on-ink);
  margin-top: 0;
}
html body .gate-visual .sub-tagline { text-align: left; color: var(--fx-on-ink); opacity: .72; max-width: 36ch; }

/* ---------- forms ---------- */
html body .field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--ink-soft);
}
html body .field input,
html body .field select,
html body .field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--fx-rule-strong);
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
  color: var(--ink);
  box-shadow: none;
}
html body .field input:focus,
html body .field select:focus,
html body .field textarea:focus {
  outline: none;
  border-bottom-color: var(--fx-thread);
  box-shadow: 0 1px 0 var(--fx-thread);
}
html body :focus-visible { outline: 2px solid var(--fx-thread); outline-offset: 2px; }

/* ---------- buttons ---------- */
html body .add-btn,
html body .submit-btn,
html body .p-checkin-btn {
  background: var(--ink);
  color: var(--fx-on-ink);
  border: 1px solid var(--ink);
  border-radius: var(--fx-r);
  box-shadow: none;
  background-image: none;
  font-weight: 600;
  letter-spacing: .01em;
}
html body .add-btn:hover,
html body .submit-btn:hover,
html body .p-checkin-btn:hover {
  background: var(--ink);
  opacity: .9;
  transform: none;
  box-shadow: none;
}
html body .remove-btn,
html body .logout { border-radius: var(--fx-r); }
html body .toggle-line a,
html body .form-msg a { color: var(--fx-thread); font-weight: 600; }

/* ---------- chips, toggles, status ---------- */
html body .chip { border-radius: 2px; }
html body .toggle,
html body .toggle button { border-radius: var(--fx-r); }
html body .app-avatar-badge { border-radius: 0; border: 1px solid var(--fx-rule-strong); box-shadow: none; background: transparent; color: var(--ink); }
html body .brand-mark { border-radius: 0; }

/* ---------- headers and figures ---------- */
html body .topbar { border-bottom: 1px solid var(--rule); }
html body .t-val,
html body .p-val,
html body .mstat-num,
html body .count {
  font-family: var(--fx-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
html body .t-lbl,
html body .p-lbl,
html body .mstat-label,
html body .nav-label,
html body .nav-group-label,
html body .t-nav-group-label {
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- navigation: a thin thread marks where you are ---------- */
html body .nav-item,
html body .t-nav-item,
html body .bottom-nav-item,
html body .tab {
  border-radius: 0;
  box-shadow: none;
}
html body .nav-item.active,
html body .t-nav-item.active,
html body .bottom-nav-item.active,
html body .tab.active {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
html body .nav-item.active { border-left: 2px solid var(--fx-thread); }
html body .bottom-nav-item.active,
html body .tab.active { box-shadow: inset 0 2px 0 var(--fx-thread); }

html body .t-drawer { border-radius: 0; box-shadow: none; border-right: 1px solid var(--rule); background: var(--white); }

@media (prefers-reduced-motion: reduce) {
  html body * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* FIX-GATE-WIDTH: the sign-in panel is a flex row on the live apps, so give both halves a share of the width */
html body .gate-visual { flex: 1.1 1 0; min-width: 0; }
html body .gate-form-side { flex: 1 1 0; min-width: 0; }

/* FIX-FONTS: the admin app sets its own fonts with high-specificity rules, so the type system is applied with !important. Code-like elements and SVG text are left alone. */
html body :where(*):not(svg, svg *, code, pre, kbd, samp) { font-family: var(--fx-ui) !important; }
html body h1,
html body .greeting,
html body #db-greeting,
html body .nd-headline,
html body .m-value,
html body .stat-value,
html body .t-val,
html body .p-val,
html body .mstat-num,
html body .count,
html body .gate-visual .tagline { font-family: var(--fx-display) !important; font-weight: 500; }
