/* copy of projects/shared/base.css, refresh with npm run css */
/* gunnStudy shared design tokens + base elements.
   Every app links this, then adds its own layout CSS on top. */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;800&display=swap');

:root {
  /* surfaces */
  --paper: #f3f1ea;        /* cream page */
  --paper-deep: #e9e6dc;   /* wells, table stripes */
  --card: #fbfaf6;         /* raised card */
  --chem: #e3ede6;         /* chemistry tint */
  --english: #e2e8f1;      /* english tint */
  --math: #e8e3ee;         /* math tint */

  /* ink */
  --ink: #1f1c17;
  --ink-2: #5f5a51;        /* secondary text, 4.6:1 on paper */
  --ink-3: #8c867b;        /* hints, placeholders */
  --line: #b9b4a8;         /* card borders */
  --line-soft: #d8d4c9;

  /* meaning */
  --right: #1d7a4b;
  --right-bg: #dcefe3;
  --wrong: #b4271f;
  --wrong-bg: #f5dcd9;

  --font: 'Geist', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --border: 2px solid var(--line);
  --ease: 160ms ease-out;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; font-weight: 800; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

/* buttons: ink-filled primary, outlined secondary. both keyboard-visible. */
button, .btn {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background var(--ease), color var(--ease), transform var(--ease);
}
button:hover, .btn:hover { background: #3a352c; border-color: #3a352c; }
button:active, .btn:active { transform: translateY(1px); }
button.secondary, .btn.secondary { background: transparent; color: var(--ink); }
button.secondary:hover, .btn.secondary:hover { background: var(--paper-deep); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

input[type="text"], input:not([type]), select, textarea {
  font: inherit;
  min-height: 44px;
  padding: 0 14px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }

:is(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #2f6fd6;
  outline-offset: 2px;
}

/* cards and wells */
.card {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.well {
  background: var(--paper-deep);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

/* quiz feedback: color plus a word, never color alone */
.feedback { font-weight: 600; border-radius: var(--radius-sm); padding: 12px 16px; }
.feedback.right { color: var(--right); background: var(--right-bg); }
.feedback.wrong { color: var(--wrong); background: var(--wrong-bg); }

/* tabs / segmented control */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: var(--border); padding-bottom: 10px; }
.tabs button { background: transparent; border-color: transparent; color: var(--ink-2); padding: 0 14px; }
.tabs button:hover { background: var(--paper-deep); color: var(--ink); }
.tabs button.active, .tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
th { font-weight: 600; color: var(--ink-2); }
tbody tr:nth-child(even) { background: var(--paper-deep); }

/* page shell shared by the apps */
.app-shell { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }
.app-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.app-top .back { font-weight: 600; color: var(--ink-2); text-decoration: none; }
.app-top .back:hover { color: var(--ink); text-decoration: underline; }
.app-top .links { display: flex; align-items: center; gap: 14px; }
.app-top .icon { display: flex; color: var(--ink-2); }
.app-top .icon:hover, .app-top .icon:focus-visible { color: var(--ink); }
.app-top .icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.score { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* club footer pinned to the viewport corners: logo left, credit right */
.site-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
.site-footer img { width: 72px; height: 72px; border-radius: 50%; display: block; }
.site-footer span { color: var(--ink-2); font-weight: 500; font-size: 0.95rem; }
.app-shell { padding-bottom: 110px; }
.site-footer a { pointer-events: auto; display: block; border-radius: 50%; transition: transform var(--ease); }
.site-footer a:hover, .site-footer a:focus-visible { transform: scale(1.12); }
