/*
  The look of the Organized app on the web: a paper sheet on linen, ink for text, sage for what
  can be chosen, terracotta for what still needs attention. Colors follow AppPalette in the app;
  titles use New York like the large titles there, the text SF Pro.
*/

:root {
  --page: #F7F3EC;
  --surface: #FFFDF9;
  --ink: #2B2722;
  --ink2: #6B6258;
  --ink3: #A39A8E;
  --line: #E3DACB;
  --sage: #3E6B5C;
  --sage-soft: #E4EDE7;
  --terracotta: #B0532F;
  --terracotta-soft: #F8E7DE;
  --shadow: 0 1px 2px rgb(43 39 34 / 0.06), 0 12px 40px rgb(43 39 34 / 0.08);
  --grain-opacity: 0.35;

  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "SF Pro Text", "Helvetica Neue", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1C1A17;
    --surface: #27231F;
    --ink: #F2ECE3;
    --ink2: #B5AB9E;
    --ink3: #7D746A;
    --line: #3A352F;
    --sage: #8FBBA9;
    --sage-soft: #2A3631;
    --terracotta: #E58F6C;
    --terracotta-soft: #3A2A22;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 40px rgb(0 0 0 / 0.35);
    --grain-opacity: 0.18;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--page);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  padding: max(24px, env(safe-area-inset-top)) 12px max(40px, env(safe-area-inset-bottom));
}

/* Linen: a fine woven grain over the page color, like PaperBackground in the app. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.35' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.38 0 0 0 0 0.3 0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.sheet {
  position: relative;
  max-width: 44rem;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 40px clamp(20px, 6vw, 56px) 32px;
}

a {
  color: var(--sage);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header */

.masthead { margin-bottom: 28px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink2);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.brand img {
  border-radius: 22.5%;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
}

.kicker {
  margin: 28px 0 4px;
  color: var(--sage);
  font-weight: 600;
  font-size: 15px;
}

h1 {
  margin: 0;
  font: 600 clamp(1.75rem, 7vw, 2.6rem)/1.15 var(--serif);
  hyphens: auto;
  overflow-wrap: break-word;
  letter-spacing: -0.01em;
}

.stand {
  margin: 10px 0 0;
  color: var(--ink2);
  font-size: 15px;
}

/* The note that this is still a draft; it goes once the placeholders are filled. */

.draft {
  margin: 0 0 28px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--terracotta-soft);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

.draft strong { color: var(--terracotta); }

/* Contents */

.contents {
  margin: 0 0 36px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contents ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 15rem;
  column-gap: 32px;
}

.contents li { break-inside: avoid; padding-left: 0; margin: 0; }
.contents li::before { display: none; }

.contents a {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}

.contents a:hover { color: var(--sage); }

.number {
  color: var(--sage);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 1.6em;
}

/* Text */

article section { margin: 0 0 32px; }

h2 {
  display: flex;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: 650;
}

h3 {
  display: flex;
  gap: 10px;
  margin: 24px 0 8px;
  font-size: 1.02rem;
  font-weight: 650;
}

h3 .number { min-width: 2.2em; font-weight: 500; }

p { margin: 0 0 12px; max-width: 68ch; }

/* German has long words; hyphens keep narrow screens even. */
p, li { hyphens: auto; overflow-wrap: break-word; }

ul {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  max-width: 68ch;
}

li {
  position: relative;
  padding-left: 22px;
  margin: 0 0 8px;
}

li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
}

strong { font-weight: 650; }

/* The short version stands out like a sage card in the app. */

section.summary {
  padding: 20px 22px 10px;
  border-radius: 20px;
  background: var(--sage-soft);
}

section.summary li::before { background: var(--sage); }

.placeholder {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--terracotta-soft);
  color: var(--terracotta);
  font-size: 0.94em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Footer */

footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink2);
  font-size: 15px;
}

footer p { margin: 0 0 6px; }

.fine { color: var(--ink3); font-size: 13px; }

/* Start page */

.home { text-align: center; padding-top: 56px; }

.hero-icon {
  border-radius: 22.5%;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.18);
}

.home h1 { margin-top: 20px; }

.lede { color: var(--ink2); margin: 8px auto 0; }

.cards {
  display: grid;
  gap: 12px;
  margin: 36px 0 8px;
  text-align: left;
}

.cards li { padding: 0; margin: 0; }
.cards li::before { display: none; }

.card {
  display: block;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--page);
  color: var(--ink);
  text-decoration: none;
}

.card strong { display: block; }
.card span { color: var(--ink2); font-size: 15px; }
.card:hover strong { color: var(--sage); }

@media print {
  body { background: none; padding: 0; }
  body::before { display: none; }
  .sheet { box-shadow: none; padding: 0; max-width: none; }
  .contents, .draft { display: none; }
}
