/* jointenner.com: ink on paper, with one orange (docs/pivot/design/ux.md §6). System fonts only. */

:root {
  color-scheme: light dark;
  --bg: #F7F3EA;
  --surface: #FFFDF8;
  --sunken: #ECE6D8;
  --line: #D8D0C0;
  --ink: #16202A;
  --ink2: #4A5560;
  --ink3: #5F6873;
  --accent: #B5470F;
  --accent-text: #A23E0A;
  --accent-soft: #FBE6D5;
  --warning: #855600;
  --warning-soft: #FBEEC8;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10161C;
    --surface: #1A222B;
    --sunken: #252F3A;
    --line: #33404D;
    --ink: #F3EFE6;
    --ink2: #B6BDC5;
    --ink3: #8E97A1;
    --accent: #F08A3E;
    --accent-text: #F4995A;
    --accent-soft: #3A2414;
    --warning: #E9B44C;
    --warning-soft: #3A2E10;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 16px; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 1; }

/* header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.375rem; }
.mark { flex: none; }
.mark .ring { stroke: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-nav a { color: var(--ink2); text-decoration: none; padding: 8px 0; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0 40px; color: var(--ink2); font-size: 0.9375rem; }
.site-footer p { margin: 0 0 8px; }

/* text */
main.wrap { padding-top: 24px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; color: var(--ink); }
h1 { font-size: 2rem; margin: 8px 0 16px; }
h2 { font-size: 1.4rem; margin: 40px 0 12px; }
h3 { font-size: 1.125rem; margin: 28px 0 8px; }
p, ul, ol, dl, blockquote, .table-wrap { margin: 0 0 16px; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
code { font-family: var(--mono); font-size: 0.9em; }
strong { font-weight: 650; }

.overline { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8125rem; font-weight: 600; color: var(--ink2); margin: 0 0 4px; }
.lead { font-size: 1.1875rem; color: var(--ink); }

.panel, .status {
  background: var(--sunken);
  border-radius: 12px;
  padding: 16px;
}
.status { background: var(--accent-soft); }
.status p:last-child, .panel:last-child { margin-bottom: 0; }

.draft {
  background: var(--warning-soft);
  border-left: 4px solid var(--warning);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 24px;
}
.draft p { margin: 0 0 4px; }
.draft p:last-child { margin-bottom: 0; }
.draft-title { font-weight: 650; }
.draft-date { color: var(--ink2); font-variant-numeric: tabular-nums; }

/* definition lists (privacy) */
dl { display: grid; gap: 4px 0; }
dt { font-weight: 650; margin-top: 12px; }
dd { margin: 0; }

/* tables (rules) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line); min-width: 8rem; }
tr:last-child td { border-bottom: 0; }
th { font-weight: 650; }

blockquote { border-left: 3px solid var(--line); padding-left: 12px; color: var(--ink2); margin-left: 0; }

/* rules */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px 8px; margin: 24px 0; }
.toc h2 { font-size: 1.125rem; margin: 12px 0 8px; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0; }
.rules section { scroll-margin-top: 16px; }

/* invitation */
.code-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 0 0 24px; text-align: center; }
.code-card .overline { margin-bottom: 8px; }
.code { font-family: var(--mono); font-size: 2rem; font-weight: 600; letter-spacing: 0.08em; margin: 0; user-select: all; -webkit-user-select: all; }

@media (min-width: 40rem) {
  h1 { font-size: 2.375rem; }
}
