/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 John Knipper */
/* pomaros.com: one stylesheet for every page, public and testers'. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/Manrope-variable.ttf") format("truetype");
}

:root {
  color-scheme: light dark;
  /* Apple orchard, pastel: cream paper, green apple, pink blush, leaf ink. */
  --paper: #fbf8ef;
  --paper-2: #f3f0e2;
  --card: #ffffff;
  --ink: #26381f;
  --ink-mid: #4f6246;
  --ink-low: #7d8b74;
  --line: #e2e3cf;
  --green: #b9de8c;
  --green-soft: #e3f2cf;
  --green-deep: #5f9a43;
  --blush: #f6b8b0;
  --blush-soft: #fde4df;
  --stem: #7a5a3a;
  --button: #5f9a43;
  --button-ink: #ffffff;
  --code-bg: #26381f;
  --code-ink: #e9f5d8;
  --shadow: 0 1px 2px rgb(38 56 31 / 6%), 0 12px 32px -12px rgb(38 56 31 / 18%);
  --radius: 18px;
  --width: 1120px;
  --text: 680px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171d14;
    --paper-2: #1d2519;
    --card: #222b1d;
    --ink: #eef4e4;
    --ink-mid: #c2cfb6;
    --ink-low: #8d9c82;
    --line: #34402c;
    --green: #9fcd72;
    --green-soft: #2a3a22;
    --green-deep: #b9de8c;
    --blush: #e9a59c;
    --blush-soft: #3a2724;
    --stem: #c9a37c;
    --button: #b9de8c;
    --button-ink: #1a2414;
    --code-bg: #0f140d;
    --code-ink: #dcefc4;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 40px -16px rgb(0 0 0 / 60%);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--blush); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--width), 100% - 32px); margin-inline: auto; }
.prose { max-width: var(--text); }

/* Header */

.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 20px; letter-spacing: -0.4px; }
.brand img { width: 30px; height: 30px; }
.brand .pom { color: var(--green-deep); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink-mid); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--green); }

@media (max-width: 640px) {
  .top .wrap { gap: 12px; }
  .nav { gap: 14px; }
  .nav a { font-size: 14px; }
  .nav .wide { display: none; }
}

/* Type */

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 600; letter-spacing: -2px; }
h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; letter-spacing: -1px; }
h3 { font-size: 20px; font-weight: 650; letter-spacing: -0.3px; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-mid); line-height: 1.55; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--green-deep); margin-bottom: 14px; }
.muted { color: var(--ink-low); }
small, .small { font-size: 14px; }

code, pre, kbd { font-family: var(--mono); font-size: 0.92em; }
:not(pre) > code { background: var(--green-soft); padding: 2px 6px; border-radius: 6px; }

/* Sections */

section { padding: clamp(56px, 8vw, 96px) 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.tint { background: var(--paper-2); }

/* Hero */

.hero { padding-top: clamp(48px, 7vw, 88px); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 .pom { color: var(--green-deep); }
.hero .lead { max-width: 34em; }
.orchard { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.orchard::before, .orchard::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; }
.orchard::before { width: 520px; height: 520px; right: -120px; top: -160px; background: var(--green-soft); }
.orchard::after { width: 360px; height: 360px; left: -140px; bottom: -160px; background: var(--blush-soft); }

@media (max-width: 860px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  background: var(--button); color: var(--button-ink);
  font-weight: 650; font-size: 16px; text-decoration: none;
  border: 1px solid transparent;
}
.button:hover { filter: brightness(1.06); text-decoration: none; }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button.ghost:hover { background: var(--card); }
.button.small { padding: 8px 14px; font-size: 14px; }

/* The laptop frame for screenshots */

.laptop { position: relative; }
.laptop .lid {
  background: #1b1f1a; border-radius: 16px 16px 6px 6px; padding: 12px;
  box-shadow: var(--shadow);
}
.laptop .screen { position: relative; border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 10; background: #8ea3ad; }
.laptop .screen > img { width: 100%; height: 100%; object-fit: cover; }
.laptop .base { height: 14px; margin: 0 -4%; border-radius: 0 0 14px 14px; background: linear-gradient(#d9dbd3, #b9bcb2); }
.laptop .base::before { content: ""; display: block; width: 18%; height: 5px; margin: 0 auto; border-radius: 0 0 6px 6px; background: #a3a69c; }

.teaser .screen .blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); }
.teaser .screen .widget {
  position: absolute; width: 58%; height: auto; right: 8%; top: 9%;
  border-radius: 3px; box-shadow: 0 10px 30px rgb(0 0 0 / 35%);
}
.ribbon {
  position: absolute; left: -10px; bottom: 34px; z-index: 2;
  background: var(--blush); color: #3b1f1b; font-weight: 700; font-size: 14px;
  padding: 8px 16px; border-radius: 10px; box-shadow: var(--shadow);
  transform: rotate(-3deg);
}

/* Chips */

.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-weight: 550; font-size: 15px;
}
.chips li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }

/* Cards */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.card .shot { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .body p { margin: 0; color: var(--ink-mid); }
.card .tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--green-deep); background: var(--green-soft); padding: 4px 10px; border-radius: 999px; }
.card .facts { list-style: none; padding: 0; margin: 4px 0 0; font-size: 15px; color: var(--ink-mid); }
.card .facts li { padding: 6px 0; border-top: 1px dashed var(--line); }
.card .actions { margin-top: auto; padding-top: 12px; }

/* Split rows */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

.figure { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--card); }
.figure figcaption { padding: 10px 14px; font-size: 14px; color: var(--ink-low); border-top: 1px solid var(--line); }

/* Steps */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps > li {
  counter-increment: step; position: relative; padding: 20px 22px 20px 70px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps > li::before {
  content: counter(step); position: absolute; left: 20px; top: 18px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700;
  background: var(--green-soft); color: var(--green-deep);
}
.steps h3 { margin-bottom: 6px; }
.steps p:last-child { margin-bottom: 0; }

/* Command line */

pre.command, pre.block {
  margin: 14px 0; padding: 16px 18px; border-radius: 12px;
  background: var(--code-bg); color: var(--code-ink);
  overflow-x: auto; white-space: pre; font-size: 14.5px; line-height: 1.5;
}
pre.command::before { content: "$ "; color: var(--green); }

/* Support table */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--ink-low); font-weight: 700; background: var(--paper-2); }
.state { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.state.works { background: var(--green-soft); color: var(--green-deep); }
.state.partial { background: #fff1c9; color: #7a5a00; }
.state.todo { background: var(--blush-soft); color: #9a3b30; }
@media (prefers-color-scheme: dark) {
  .state.partial { background: #3a3218; color: #f0d78a; }
  .state.todo { color: var(--blush); }
}

/* Notes */

.note {
  border-left: 4px solid var(--green); background: var(--green-soft);
  padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 20px 0;
}
.note.warn { border-color: var(--blush); background: var(--blush-soft); }
.note p:last-child { margin-bottom: 0; }

/* FAQ */

details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 650; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--green-deep); font-weight: 400; font-size: 24px; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details > :not(summary) { margin-top: 12px; color: var(--ink-mid); }

/* News */

.posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; max-width: var(--text); }
.posts time { font-size: 14px; color: var(--ink-low); font-weight: 600; }
.posts h3 { margin: 4px 0 8px; }

/* Footer */

.foot { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 15px; color: var(--ink-mid); background: var(--paper-2); }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.foot h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-low); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { color: var(--ink-mid); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot .legal { grid-column: 1 / -1; font-size: 13px; color: var(--ink-low); border-top: 1px solid var(--line); padding-top: 20px; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot .about { grid-column: 1 / -1; } }

/* 404 */

.lost { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.lost svg { width: 96px; height: 96px; margin: 0 auto 20px; }

/* Utilities (the CSP forbids inline styles) */

.hero .wrap.single { display: block; }
.actions.center { justify-content: center; }
.lost img { width: 96px; height: 96px; margin: 0 auto 20px; }

/* Copy button beside a command */

.copyable { position: relative; }
.copyable pre { padding-right: 92px; }
.copy {
  position: absolute; right: 10px; top: 10px;
  font: 600 13px var(--font); padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: var(--green); color: #1a2414; border: 0;
}
.copy[data-done] { background: var(--blush); }

/* Testers' gallery */

.gallery { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.gallery .figure { margin: 0; }
.gallery .figure:first-child { grid-column: 1 / -1; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
@media (max-width: 760px) { .gallery { grid-template-columns: minmax(0, 1fr); } }

/* Tester agreement */

.agreement h3 { margin-top: 1.6em; }
.agreement ul { padding-left: 1.2em; }
.agreement li { margin-bottom: 0.4em; }
.accept-form label { display: block; font-weight: 600; margin: 18px 0 6px; }
.accept-form input[type="text"], .accept-form input[type="email"] {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.accept-form input:focus-visible { outline: 3px solid var(--green); outline-offset: 1px; }
.accept-form .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; margin-top: 22px; }
.accept-form .check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--green-deep); flex: none; }
.accept-form button { cursor: pointer; font-family: inherit; }
.receipt th { width: 30%; }
.receipt code { word-break: break-all; }

@media print {
  .top, .foot, .no-print, .orchard { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  section { padding: 12pt 0; border: 0 !important; }
  .tint { background: none; }
  a { color: #000; text-decoration: none; }
}

/* Admin */

.inline-form { margin-top: 24px; }
.table-wrap form { margin: 0; }
.table-wrap + p { margin-top: 12px; }

/* Forms: one block per field */

.accept-form .field { margin: 0 0 20px; }
.accept-form .field label { margin-top: 0; }
.accept-form .checks { display: grid; gap: 14px; margin-top: 26px; }
.accept-form .check { margin: 0; }
.accept-form .check span { flex: 1; }
.accept-form textarea, .accept-form select {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.accept-form textarea { resize: vertical; min-height: 180px; line-height: 1.5; }
.accept-form .hint { margin: 6px 0 0; font-size: 14px; color: var(--ink-low); }
/* The trap for robots: present in the form, invisible and unreachable for people. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Admin badge in the navigation */

.nav .admin-link { display: none; position: relative; }
html.admin .nav .admin-link { display: inline; }
.nav .badge {
  position: absolute; top: -9px; right: -16px;
  min-width: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--blush); color: #3b1f1b; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px;
}
.nav .badge[hidden] { display: none; }

/* Messages */

.messages { display: grid; gap: 16px; }
.message { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.message.new { border-left: 5px solid var(--green-deep); }
.message header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.message .tag { font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--green-deep); background: var(--green-soft); padding: 3px 10px; border-radius: 999px; }
.message .body { white-space: pre-wrap; margin: 12px 0; }
.message .actions { margin-top: 8px; align-items: center; }
.message form { margin: 0; }
