/* The guide's dress: the office's. The same tokens, the same twelve-column
   grid, Soehne for the interface and Newsreader for the reading text, square
   everything, hierarchy by size and weight only, every control a word.

   The tokens below are office/static/office.css's, copied. tools/check.py
   compares the two on every build and refuses to build when they differ,
   so a change to the office's palette is a change here too. The guide adds
   one token the office does not need: --clerk, the assistant's green
   (the app's docs/design.md, "Two text styles").

   THE FONTS. Soehne is LICENSED, not open. It is served from
   maitland.app's own /fonts/ door and from nowhere else -- never a CDN,
   never another domain. Newsreader and IBM Plex Mono are OFL and come
   from Google Fonts. */

@font-face{font-family:"Sohne";font-weight:400;font-style:normal;font-display:block;
  src:url("/fonts/soehne-buch.woff2") format("woff2")}
@font-face{font-family:"Sohne";font-weight:500;font-style:normal;font-display:block;
  src:url("/fonts/soehne-kraftig.woff2") format("woff2")}
@font-face{font-family:"Sohne";font-weight:600;font-style:normal;font-display:block;
  src:url("/fonts/soehne-halbfett.woff2") format("woff2")}
@font-face{font-family:"Sohne";font-weight:700;font-style:normal;font-display:block;
  src:url("/fonts/soehne-dreiviertelfett.woff2") format("woff2")}

/* the app's palette, by day -- the office's, exactly */
:root{
  --paper:#ECE9E3;
  --paper-hi:#F4F2EF;
  --ink:#201F1B;
  --pen:#1A4BA8;
  --pen-soft:rgba(26,75,168,.16);
  --pencil:#6B6455;
  --stamp:#A63D40;
  --rule:#D3CBB9;
  --card:#FFFEFA;

  --ui:"Sohne",system-ui,-apple-system,sans-serif;
  --body:"Newsreader",Georgia,serif;
  --mono:"IBM Plex Mono",ui-monospace,monospace;

  /* three text sizes and one figure size */
  --s1:11px;
  --s2:16px;
  --s3:28px;
  --fig:64px;

  --gutter:32px;
  --gap:24px;
  --wide:1200px;

  /* the guide's own: the assistant's green */
  --clerk:#21684A;
}

/* the app's palette, by night -- the office's, exactly */
@media (prefers-color-scheme:dark){
  :root{
    --paper:#15110C;
    --paper-hi:#24221F;
    --ink:#E8E4D8;
    --pen:#8AA4EE;
    --pen-soft:rgba(138,164,238,.24);
    --pencil:#A5A79A;
    --stamp:#D08C87;
    --rule:#3A362C;
    --card:#292724;

    --clerk:#63BC93;
  }
}

/* a failure, and nothing else, is in the stamp's red */
:root{--trouble:var(--stamp)}

@media (max-width:719px){
  :root{--gutter:16px;--gap:16px;--fig:52px}
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;border-radius:0}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font-family:var(--ui);font-size:var(--s2);line-height:1.5;
  font-feature-settings:"tnum" 1;
}
img,video,svg{max-width:100%}
:focus-visible{outline:2px solid var(--pen);outline-offset:2px}
::placeholder{color:var(--pencil);opacity:1}

/* ---------- the frame and the grid ---------- */
.frame{max-width:calc(var(--wide) + 2 * var(--gutter));margin:0 auto;
  padding:0 var(--gutter)}
.grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));
  column-gap:var(--gap)}
.c3{grid-column:span 3}.c9{grid-column:span 9}.c12{grid-column:1 / -1}
@media (max-width:719px){
  .grid{grid-template-columns:minmax(0,1fr)}
  .c3,.c9,.c12{grid-column:1 / -1}
}

/* ---------- the index ----------
   The office's header: the mark at the left in tracked capitals, the
   words at the right. Here they are `search` and the way back to
   maitland.app, in pencil as the office's `sign out` is; the open
   search takes the 2px pen bar the office gives the room stood in. */
.index{border-bottom:1px solid var(--rule);background:var(--paper)}
.index .bar{display:flex;flex-wrap:wrap;align-items:baseline;
  column-gap:var(--gap);row-gap:6px;padding-top:16px;padding-bottom:12px}
/* the office's room words stand at 17px, a pixel under its `sign out`
   button's line; the guide's words stand where the rooms do, so the
   two headers are the same 59px */
.index .at{padding-top:1px}
.index .mark{font-family:var(--ui);font-weight:600;font-size:var(--s1);
  letter-spacing:.14em;text-transform:uppercase;color:var(--ink);
  text-decoration:none;margin-right:16px;white-space:nowrap}
.index .at{display:flex;align-items:baseline;column-gap:22px;margin:0 0 0 auto}
.word-at{font-family:var(--ui);font-size:var(--s2);line-height:1.5;color:var(--pencil);
  background:none;border:0;border-bottom:2px solid transparent;padding:0 0 3px;
  margin:0;cursor:pointer;text-decoration:none;white-space:nowrap}
.word-at:hover{color:var(--pen)}
.word-at[aria-expanded="true"]{color:var(--ink);border-bottom-color:var(--pen)}
@media (max-width:719px){
  .index .bar{padding-top:12px}
  .index .mark{flex:1 0 auto}
  .index .at{column-gap:16px}
}

/* ---------- search ----------
   The office's search: a field that is an underline, the results as the
   Library prints them -- the name, the summary in pencil under it, a
   hairline between. The field stands in the first three columns, the
   results in the other nine. Nothing is sent anywhere; the index is a
   file. */
.search{display:none;border-bottom:1px solid var(--rule);background:var(--paper)}
.search.open{display:block}
.search .grid{padding-top:18px;padding-bottom:22px;align-items:start}
.find{display:flex;align-items:baseline;gap:14px;margin:0}
.find input{flex:1 1 auto;min-width:0;font-family:var(--ui);font-size:var(--s2);
  color:var(--ink);background:transparent;border:0;border-bottom:1px solid var(--rule);
  padding:6px 0;-webkit-appearance:none;appearance:none}
.find input:focus{outline:none;border-bottom-color:var(--pen)}
.find input::-webkit-search-decoration,.find input::-webkit-search-cancel-button{
  -webkit-appearance:none;appearance:none;display:none}
.search .none{color:var(--pencil);margin:6px 0 0}
.search .none:empty{display:none}
.search .rows{margin:0}
.search .rows:empty{display:none}
@media (max-width:719px){
  .search .c9{margin-top:14px}
}

/* ---------- the page ---------- */
main.page{padding-top:28px;padding-bottom:80px}
.guide{align-items:start}

.page h1{font-family:var(--ui);font-weight:700;font-size:var(--s3);
  letter-spacing:-.02em;line-height:1.1;margin:0 0 14px}
.eyebrow{font-family:var(--ui);font-weight:600;font-size:var(--s1);
  letter-spacing:.12em;text-transform:uppercase;color:var(--pencil);
  margin:28px 0 8px}

/* ---------- the contents ----------
   The chapters as the office numbers its rooms: the number in pencil,
   the name in ink, the chapter being read under the 2px pen bar. On a
   laptop they stand in the first three columns and stay in view; on a
   phone they do not print (below). */
.shelf{position:sticky;top:28px}
.chapters{list-style:none;margin:0;padding:0}
.chapters li{margin:0 0 7px}
.chapters a{display:inline-block;color:var(--ink);text-decoration:none;font-weight:500;
  padding-bottom:3px;border-bottom:2px solid transparent}
.chapters a:hover{color:var(--pen)}
.chapters a.here{border-bottom-color:var(--pen)}
.chapters .n{font-size:var(--s1);font-weight:400;color:var(--pencil);margin-right:6px;
  letter-spacing:.04em}
/* On a phone the contents do not print at all, on a chapter as on the
   contents page: seven names run as a row would push the chapter's
   heading down a third of the screen. The header's `guide` is the way
   to them, and the foot's previous and next walk the chapters in order. */
@media (max-width:719px){
  .shelf{display:none}
}

/* ---------- a chapter ----------
   The reading column at the office's measure, 42em of the reading size
   (counted in pixels, so a section's 11px name keeps the same width). */
.leaf > h1,.leaf > .summary,.leaf .prose > *,.leaf > .foot{max-width:calc(42 * var(--s2))}
.leaf .prose > .scroller{max-width:none}
.summary{font-family:var(--body);font-size:var(--s2);font-size-adjust:.5;
  line-height:1.6;color:var(--pencil);margin:0 0 24px}

/* reading text, as the office's .prose */
.prose,.prose p,.prose li{font-family:var(--body);font-size:var(--s2);
  font-size-adjust:.5;line-height:1.6}
.prose p{margin:0 0 14px}
/* a long bare address (the Privacy Policy prints one) breaks rather than
   push the page sideways on a phone */
.prose p,.prose li{overflow-wrap:anywhere}
.prose ul,.prose ol{margin:0 0 14px;padding-left:20px}
.prose li{margin:0 0 6px}
.prose hr{border:0;border-top:1px solid var(--rule);margin:32px 0}
.prose strong{font-weight:600}
.prose a{color:var(--ink);text-decoration:underline;text-decoration-thickness:1px;
  text-underline-offset:3px}
.prose a:hover{color:var(--pen)}

/* A chapter's sections: a hairline and space, the name in Soehne's
   tracked capitals, as the office names its sections. */
.prose h2{font-family:var(--ui);font-weight:600;font-size:var(--s1);font-size-adjust:none;
  letter-spacing:.12em;text-transform:uppercase;color:var(--pencil);line-height:1.5;
  border-top:1px solid var(--rule);padding-top:18px;margin:32px 0 10px}
.prose h3,.prose h4{font-family:var(--ui);font-weight:600;font-size:var(--s2);
  font-size-adjust:none;margin:24px 0 6px}

.prose blockquote{margin:20px 0;padding-left:16px;border-left:1px solid var(--rule);
  color:var(--pencil)}
.prose blockquote p{margin:0 0 10px}
.prose blockquote p:last-child{margin:0}

/* A word the app prints, printed here in the app's own hand: the acting
   word's dress -- Soehne, tracked, ink, a 1px ink underline -- so
   `PICK IT UP` on the page looks like PICK IT UP on the phone. */
.prose .word{font-family:var(--ui);font-weight:600;font-size:12.5px;font-size-adjust:none;
  letter-spacing:.06em;color:var(--ink);border-bottom:1px solid var(--ink);
  padding-bottom:1px;white-space:nowrap}

/* The assistant's own words: her green monospace, bare -- her hand is the
   mark, so no rule stands beside it. */
.prose blockquote.clerk{font-family:var(--mono);font-size:14px;line-height:1.7;
  color:var(--clerk);border-left:0;padding-left:0;margin:20px 0}
.prose blockquote.clerk p{font-family:var(--mono);font-size:14px;font-size-adjust:none;
  line-height:1.7}

/* A film: the picture alone, no box, its caption in pencil beneath. It
   plays while it is being looked at and stops when it is not. */
.film{margin:24px 0;padding:0}
.film video{display:block;width:100%;height:auto;background:var(--paper-hi)}
.film figcaption{font-family:var(--ui);font-size:var(--s1);line-height:1.5;
  color:var(--pencil);margin-top:8px}

/* tables: the one thing allowed its own sideways scroll */
.scroller{overflow-x:auto;margin:0 0 20px;-webkit-overflow-scrolling:touch}
.prose table{border-collapse:collapse;font-size:var(--s2);min-width:100%}
.prose th,.prose td{text-align:left;padding:7px 16px 7px 0;
  border-bottom:1px solid var(--rule);vertical-align:top}
.prose th{font-family:var(--ui);font-weight:600;font-size:var(--s1);letter-spacing:.12em;
  text-transform:uppercase;color:var(--pencil)}
.prose table td{font-family:var(--ui);font-size-adjust:none;line-height:1.45}

/* ---------- the listings ----------
   The Library's: one row each, a hairline between, the name in ink and
   what it holds in pencil under it. A name printed as a row is a link
   by position: ink, no underline, the pen on hover. */
.rows{list-style:none;margin:6px 0 28px;padding:0}
.rows li{display:flex;align-items:baseline;justify-content:space-between;gap:20px;
  padding:9px 0;margin:0;border-bottom:1px solid var(--rule)}
.rows li:first-child{border-top:1px solid var(--rule)}
.rows li a{color:var(--ink);text-decoration:none;min-width:0;overflow-wrap:anywhere}
.rows li a:hover{color:var(--pen)}
.rows .entry{display:flex;flex-direction:column;min-width:0}
.rows .entry .gloss{font-size:var(--s1);line-height:1.45;color:var(--pencil);margin-top:2px;
  max-width:62ch}
.rows.found .entry .gloss{font-family:var(--body);font-size:var(--s2);font-size-adjust:.5}

/* ---------- the foot ----------
   Previous and next, as words: which way in pencil capitals, the
   chapter's name in ink. Nothing else -- no dates, no counters, nothing
   asking whether this was helpful. */
.foot{display:flex;justify-content:space-between;gap:24px;margin:36px 0 0;
  padding-top:12px;border-top:1px solid var(--rule)}
.foot a{display:block;color:var(--ink);text-decoration:none;max-width:46%}
.foot a:hover,.foot a:hover .eyebrow{color:var(--pen)}
.foot .eyebrow{display:block;margin:0 0 2px}
.foot .t{display:block;font-weight:500}
.foot .next{text-align:right;margin-left:auto}

/* ---------- the colophon ----------
   The public page's colophon (public.html, .pf-colophon), closing every
   page of the site the same way: the company and the mailbox in pencil
   at the left, Support, Privacy and Terms at the right, each a link word
   in ink under its hairline. */
.colophon{border-top:1px solid var(--rule)}
.colophon .bar{display:flex;justify-content:space-between;align-items:baseline;
  flex-wrap:wrap;gap:10px 22px;padding-top:15px;padding-bottom:19px;
  font-family:var(--ui);font-size:12px;color:var(--pencil)}
.colophon a.addr{color:var(--pencil);text-decoration:none}
.colophon a.addr:hover{color:var(--pen)}
.colophon .doors{display:flex;gap:22px}
.colophon .doors a{font-family:var(--ui);font-weight:600;font-size:12.5px;
  letter-spacing:.01em;color:var(--ink);text-decoration:none;
  border-bottom:1px solid var(--ink);padding-bottom:3px}
.colophon .doors a:hover{color:var(--pen);border-bottom-color:var(--pen)}

@media (prefers-reduced-motion:reduce){
  *{animation-duration:.001ms !important;transition-duration:.001ms !important}
  html{scroll-behavior:auto}
}

/* ---------- turning the page ----------
   Every click here is a real page load, and a bare load repaints the
   whole sheet at once, which the owner found distracting (Sep 15, 2026).
   A cross-document view transition crossfades the old page into the new
   and holds the header and the contents exactly where they stand, so
   only the chapter is seen to change. A browser without it simply loads
   the page as before. */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.18s}
.index{view-transition-name:index}
.shelf{view-transition-name:shelf}
@media (prefers-reduced-motion:reduce){
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none !important}
}
