/* Sashing's palette, taken from the app rather than from taste: SashingColors in
   apps/sashing/.../ui/theme/SashingTokens.kt (design direction A, "Design wall"). Every colour here
   is achromatic (R = G = B) and there is no accent: the primary action is ink. The only colour on
   a page comes from fabric photographs, exactly as in the app, because a tinted surround shifts
   how fabric reads. Schibsted Grotesk and Red Hat Mono are the app's own two faces; measurements
   are set in the mono, as the app sets them. */
:root {
  --page: #F5F5F5;
  --raised: #FFFFFF;
  --shade: #E8E8E8;
  --wall: #C9C9C9;
  --rule: #D9D9D9;
  --ink: #1B1B1B;
  --ink-muted: #595959;
  --on-ink: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #181818;
    --raised: #1F1F1F;
    --shade: #262626;
    --wall: #4A4A4A;
    --rule: #303030;
    --ink: #EDEDED;
    --ink-muted: #A3A3A3;
    --on-ink: #141414;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
header.site {
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  margin-bottom: 40px;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
header.site a { color: var(--ink); text-decoration: none; font-weight: 700; }
header.site nav a { color: var(--ink-muted); font-weight: 500; font-size: 15px; margin-left: 18px; }
header.site nav a:hover, header.site a:hover { color: var(--ink); text-decoration: underline; }

h1 { font-size: 34px; line-height: 1.2; margin: 0 0 16px; letter-spacing: -0.015em; font-weight: 700; }
h2 { font-size: 24px; line-height: 1.25; margin: 40px 0 12px; font-weight: 700; }
h3 { font-size: 19px; margin: 28px 0 8px; font-weight: 600; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
/* No accent colour exists, so links are told apart by their underline, never by hue. */
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, .m {
  font-family: 'Red Hat Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.94em;
}
code { background: var(--shade); border-radius: 4px; padding: 1px 5px; }
.meta { color: var(--ink-muted); font-size: 15px; margin-bottom: 28px; }

/* The Short answer box: every guide opens with one, because most of the traffic wants the answer
   and not the article. */
.short {
  background: var(--raised);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--ink);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 24px;
}
.short p:last-child { margin-bottom: 0; }
.short strong { display: block; margin-bottom: 6px; }

.cta-inline { margin: 0 0 28px; }
.cta {
  display: inline-block;
  background: var(--ink);
  color: var(--on-ink);
  text-decoration: none;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 22px;
}
.cta:hover { opacity: 0.9; text-decoration: none; }
.card {
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 24px;
  margin: 40px 0;
}
.card h2 { margin-top: 0; }
.more { border-top: 1px solid var(--rule); margin-top: 48px; padding-top: 24px; }
.more ul { list-style: none; padding: 0; }
.more li { margin-bottom: 10px; }

/* Tables of cut sizes and yardage: numbers in the mono, right-aligned like the app's yardage. */
.tbl { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 16px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl th { font-weight: 600; color: var(--ink-muted); font-size: 14px; }
.tbl td.n { font-family: 'Red Hat Mono', ui-monospace, monospace; white-space: nowrap; }
.scroll { overflow-x: auto; }

.note { font-size: 15px; color: var(--ink-muted); }

footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 56px;
  padding: 28px 0 48px;
  color: var(--ink-muted);
  font-size: 15px;
}
footer.site a { color: var(--ink-muted); }
@media (max-width: 480px) {
  h1 { font-size: 28px; }
  body { font-size: 16px; }
  .tbl { font-size: 15px; }
  .tbl th, .tbl td { padding: 7px 6px; }
}
