/* Start page of the base domain (index.html.j2). System fonts only, light and dark, no
   external resources (the Content-Security-Policy in the Caddyfile allows none). */
:root {
  color-scheme: light dark;
  --bg: #f7f3ec;
  --bg-2: #efe8dc;
  --surface: #fffdf9;
  --text: #2b2520;
  --muted: #6b5f55;
  --accent: #b5471f;
  --accent-ink: #ffffff;
  --accent-soft: #f6dcd0;
  --sage: #3f6b4f;
  --sage-soft: #dcebe0;
  --border: #e6ddd0;
  --ring: #d97b4f;
  --shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 10px 30px rgba(60, 40, 20, .07);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1917;
    --bg-2: #221f1c;
    --surface: #27231f;
    --text: #f1ebe3;
    --muted: #b3a89c;
    --accent: #e8864f;
    --accent-ink: #1b1917;
    --accent-soft: #3d2a20;
    --sage: #9ccfa9;
    --sage-soft: #24332a;
    --border: #3a342e;
    --ring: #f0a070;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(900px 420px at 50% -120px, var(--bg-2), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
main { max-width: 880px; margin: 0 auto; padding: 16px 16px 48px; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 8px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 600;
}
.skip:focus-visible { top: 12px; }

/* Language: a quiet segmented control. */
.lang { display: flex; justify-content: flex-end; gap: 0; margin-bottom: 8px; }
.lang button {
  font: inherit; font-size: 13px; cursor: pointer; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--border); background: var(--surface);
  margin-left: -1px;
}
.lang button:first-child { border-radius: 999px 0 0 999px; margin-left: 0; }
.lang button:last-child { border-radius: 0 999px 999px 0; }
.lang button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); position: relative; }

/* Hero: the house, the name, one action. */
.hero { text-align: center; padding: 20px 0 8px; }
.mark { width: 72px; height: 72px; color: var(--accent); }
h1 { margin: 6px 0 0; font-size: clamp(36px, 8vw, 52px); letter-spacing: -.03em; line-height: 1.05; font-weight: 750; }
.tagline { margin: 6px 0 0; color: var(--muted); font-size: 17px; }
.lead { margin: 14px auto 18px; max-width: 34ch; color: var(--text); font-size: 16px; }
.button {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: min(100%, 320px); padding: 14px 28px; border-radius: 18px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
  font-size: 19px; font-weight: 700; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(60, 40, 20, .08), 0 14px 34px rgba(60, 40, 20, .14); }
.button:active { transform: translateY(0); }
.button-sub { font-size: 13px; font-weight: 500; opacity: .9; }
.alt-login { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.alt-login a { font-weight: 600; }

.section-title {
  margin: 28px 4px 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px;
}

/* Cards: the apps. */
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 440px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 16px 16px 16px 14px; border-radius: 18px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--ring); }
.card .icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent-soft); font-size: 24px; line-height: 1;
}
.card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card .title { font-weight: 650; font-size: 17px; }
.card .text { color: var(--muted); font-size: 14px; line-height: 1.4; }
.card .arrow { color: var(--muted); font-size: 18px; transition: transform .15s ease, color .15s ease; }
/* a card of a service only the house networks reach (start_page.card): the dot of "only at home" */
.card-home .text { display: inline-flex; align-items: center; gap: 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; letter-spacing: .02em; }
.card:hover .arrow { transform: translateX(3px); color: var(--accent); }
@media (min-width: 720px) {
  .card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; gap: 12px; padding: 18px; }
  .card .arrow { display: none; }
}

/* Only at home: a sage strip. */
.home-only {
  margin-top: 12px; padding: 14px 18px 16px; border-radius: 18px;
  background: var(--sage-soft); border: 1px dashed var(--sage);
}
.home-only .section-title { margin: 0 0 8px; color: var(--sage); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); display: inline-block; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.links a {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  text-decoration: none; font-weight: 600; font-size: 14px;
}
.links a:hover { border-color: var(--sage); }

/* Help: short, foldable. */
.box {
  margin-top: 10px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
}
.box summary {
  display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none;
  padding: 14px 16px; font-weight: 650; font-size: 16px;
}
.box summary::-webkit-details-marker { display: none; }
.box summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .15s ease;
}
.box[open] summary::after { transform: rotate(-135deg); }
.box summary .icon {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--bg-2); font-size: 18px; line-height: 1; flex: none;
}
.box-body { padding: 0 16px 16px 62px; color: var(--muted); }
.box-body p, .box-body ol { margin: 0; }
.box-body p + p, .box-body p + ol { margin-top: 6px; }
.box-body a { font-weight: 600; }
.box-body ol { padding-left: 20px; }
.box-body li + li { margin-top: 4px; }
@media (max-width: 439px) { .box-body { padding-left: 16px; } }
code {
  font: 600 14px ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 1px 6px; border-radius: 6px; background: var(--bg-2); color: var(--text);
}

footer {
  margin-top: 36px; text-align: center; color: var(--muted); font-size: 13px;
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
}
footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .card, .card .arrow, .box summary::after { transition: none; }
  .button:hover, .card:hover { transform: none; }
}

/* The getting-started guide (getting-started.html.j2). */
.page-head { padding: 8px 0 12px; }
.page-head h1 { font-size: 28px; margin: 10px 0 0; letter-spacing: -.01em; }
.page-head .lead { margin: 10px 0 0; max-width: 60ch; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--muted); }
.back:hover { color: var(--accent); }
.guide .section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; }
.num {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.step ol { margin: 0; padding-left: 22px; }
.step ol li { margin: 0 0 10px; line-height: 1.5; }
.step .muted { color: var(--muted); margin: 0 0 12px; }
.apps { display: grid; gap: 12px; }
@media (min-width: 720px) { .apps { grid-template-columns: repeat(2, 1fr); } }
.app { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.app h3 { margin: 0 0 8px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.app p, .app ol { margin: 0; line-height: 1.5; }
.app ol { padding-left: 20px; }
.app ol li + li { margin-top: 6px; }
.paper p { margin: 0; padding: 14px 16px; background: var(--accent-soft); border-radius: 14px; line-height: 1.5; }
.trouble dl { margin: 0; display: grid; gap: 10px; }
.trouble dt { font-weight: 650; }
.trouble dd { margin: 2px 0 0; color: var(--muted); line-height: 1.5; }
.button-small {
  display: inline-block; margin-top: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
}
.button-small:hover { filter: brightness(1.05); }
.button-small.quiet { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.buttons .button-small { margin-top: 0; }
.box-body .small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.alt-login .sep { margin: 0 4px; }
