/* TogetherEd, shared styles. Monochrome, system type, light and dark. */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --panel: #f6f6f6;
  --accent: #C2410C;
  --accent-fg: #ffffff;
  --radius: 10px;
  --max: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --fg: #f2f2f2;
    --muted: #9a9a9a;
    --line: #262626;
    --panel: #171717;
    --accent: #FB923C;
    --accent-fg: #0f0f0f;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 650; }
h2 { font-size: 1.35rem; font-weight: 600; margin-top: 2rem; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 10px 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.wordmark { font-weight: 700; text-decoration: none; letter-spacing: -0.02em; font-size: 1.1rem; }
.site-nav { display: flex; gap: 8px 16px; font-size: .95rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 2px; }
.site-nav a:hover { color: var(--fg); }

main { padding: 40px 0 64px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* Tool grid on the home page */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 28px 0; }
.tool-card { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--panel); }
.tool-card:hover { border-color: var(--fg); }
.tool-card strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.tool-card span { color: var(--muted); font-size: .95rem; }
.tool-card .soon { display: inline-block; margin-top: 8px; font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }

/* Controls */
button, .btn {
  font: inherit; font-size: .95rem; font-weight: 550;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg);
  border-radius: 8px; padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-block;
}
button.secondary, .btn.secondary { background: transparent; color: var(--fg); border-color: var(--fg); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--fg); outline-offset: 2px;
}
textarea, input[type="text"], input[type="number"], input[type="url"], input[type="date"], input[type="search"], input[type="email"], select {
  font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%;
}
textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
label { font-size: .9rem; color: var(--muted); display: block; margin-bottom: 6px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field { margin-bottom: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--panel); }
.two-col { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.hint { font-size: .85rem; color: var(--muted); margin-top: 6px; }
kbd { font: .8rem ui-monospace, SFMono-Regular, Menlo, monospace; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; }

/* Display mode: full-screen, huge, no chrome. For projecting. */
.display { position: fixed; inset: 0; background: var(--bg); color: var(--fg); display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 50; padding: 4vw; text-align: center; }
.display.on { display: flex; }
.display .big { font-size: clamp(3rem, 14vw, 18vw); font-weight: 700; letter-spacing: -0.02em; line-height: 1; word-break: break-word; }
.display .sub { margin-top: 2vw; font-size: clamp(1rem, 2.5vw, 2rem); color: var(--muted); }
.display .bar { position: fixed; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 22px 0 40px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* Content pages */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2rem; }
.prose ol, .prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }

@media (prefers-reduced-motion: no-preference) {
  .tool-card, button { transition: border-color .15s ease, opacity .15s ease; }
}
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}
