/* The app support sites' own stylesheet (the same file in gradatim/ and impensa/). It started as a copy of
   main/src/assets/site.css cut down to the rules these pages use; it isn't kept in step with that file, so
   change it here and copy it to the other app folder. */
/* A surveyor's notebook: a contour map along the top, strict
   Swiss type and rules, faint graph paper and the odd handwritten note.
   Values come from the approved "Subtle" design. */

/* Fonts are served from this site (assets/fonts/, SIL Open Font License), not from Google. */
@font-face { font-family: "Archivo"; src: url("/assets/fonts/archivo-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
:root {
  --paper: #fbfbf6;
  --ink: #1c2633;
  --ink-2: #4d5866;
  --red: #c8372d;
  --sage: #eef1e4;
  --rule: #1c2633;
  --grid: rgba(215, 227, 239, 0.55);
  --f-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --f-hand: "Caveat", "Bradley Hand", cursive;
  --col: 680px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 15px/1.5 var(--f-sans);
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 14px 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
p { margin: 0; }
img { max-width: 100%; height: auto; }

.in { position: relative; max-width: var(--col); margin: 0 auto; padding-inline: 20px; }

/* Map band */
.map { position: relative; height: 196px; background: var(--sage); border-bottom: 2px solid var(--rule); overflow: hidden; }
.map.thin { height: 96px; }
/* The contour map is a picture (assets/map-phone.svg, map-wide.svg) so each page doesn't carry 50 KB of lines. */
.map .topo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map .wide { display: none; }
@media (min-width: 700px) {
  .map .phone { display: none; }
  .map .wide { display: block; }
}
.pin {
  position: absolute; z-index: 1; width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border-radius: 50%; background: var(--red); color: #fff;
  font: 700 10.5px/20px var(--f-sans); text-align: center; text-decoration: none;
  box-shadow: 0 0 0 2px var(--sage);
}
a.pin:hover { transform: scale(1.12); }
.bar {
  position: absolute; z-index: 2; left: 0; right: 0; top: 0;
  max-width: var(--col); margin: 0 auto; padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font: 700 12px var(--f-mono); letter-spacing: 0.04em;
}
.bar .home { text-decoration: none; text-transform: uppercase; }
/* A sage chip behind each piece of top bar text, so the contour lines don't run through it. */
.bar .home, .bar nav a { background: var(--sage); padding: 2px 6px; margin: -2px -6px; box-shadow: 0 0 0 1px var(--sage); }
.bar nav { display: flex; gap: 26px; font-weight: 400; }
.bar nav a { text-decoration: none; }
.bar nav a:hover, .bar .home:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Type */
.t { font-size: 40px; line-height: 0.95; font-weight: 800; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
.t i { font-style: normal; color: var(--red); }
h2.t { font-size: 26px; line-height: 1; letter-spacing: -0.025em; margin: 0 0 20px; }
.lead { font-size: 19px; line-height: 1.3; font-weight: 600; margin-top: 14px; letter-spacing: -0.01em; }
.lab {
  font: 700 11px var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
}
.lab::before { content: ""; width: 7px; height: 7px; background: var(--red); flex: none; }

/* Tables made of rules */
.rows { border-top: 2px solid var(--rule); }
.kv { display: grid; grid-template-columns: 104px 1fr; margin: 0; border-top: 2px solid var(--rule); }
.kv > * { padding: 9px 0; border-bottom: 1px solid var(--rule); }
.kv dt { font: 400 11.5px var(--f-mono); color: var(--ink-2); padding-top: 11px; padding-right: 10px; }
.kv dd { margin: 0; font-size: 14px; }
.kv dd span { color: var(--ink-2); }

.para { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.para .lab { margin-bottom: 4px; }

/* Footer */
.foot { margin-top: 34px; padding-block: 14px 26px; display: grid; gap: 6px; font: 400 12px var(--f-mono); }
.foot nav { display: flex; gap: 16px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Small phones */
@media (max-width: 360px) {
  .t { font-size: 34px; }
}

/* App pages (Gradatim, Impensa) */
.appicon { width: 72px; height: 72px; border: 1px solid var(--rule); display: block; margin-top: 22px; }
.app-title { margin-top: 14px; font-size: 36px; }
.page-title { margin-top: 22px; font-size: 40px; }
/* Plain text, no underline, so it doesn't sit on top of the table's line. */
.btnline { display: inline-block; margin-top: 14px; font: 700 13px var(--f-mono); }
.kv dd a, .para a, .intro a, .foot a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.date { margin-top: 12px; font: 400 12px var(--f-mono); color: var(--ink-2); }
.intro p, .para p { margin-top: 6px; }
.para .lab + p { margin-top: 0; }
.intro { margin-top: 14px; }
