/* SluiceSpark wears Maple Hollow's theme (app/ui/theme/Theme.kt):
   light = parchment, forest green, brass and clay; dark = a night sky with parchment text.
   A reading column of bookish serif headings over the app's plain sans body. */
:root {
  --paper: #ECE3CC;       /* background */
  --card: #F7F1E1;        /* card surface */
  --vellum: #E3D8BC;      /* surface variant */
  --ink: #2B2A22;         /* text */
  --muted: #5A5546;       /* onSurfaceVariant */
  --rule: #CFC4A6;        /* outlineVariant */
  --outline: #8F8670;
  --primary: #2F4A3C;     /* forest */
  --primary-soft: #C9D9C9;
  --brass: #A87A22;
  --brass-soft: #E8D3A2;
  --clay: #8C3A24;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #13151B;     /* night */
    --card: #1C1F27;
    --vellum: #252935;
    --ink: #E2D8C0;       /* starlight */
    --muted: #A9A390;     /* dust */
    --rule: #33363F;
    --outline: #4A4E5A;
    --primary: #8FBFA3;   /* sage */
    --primary-soft: #2A4436;
    --brass: #D6AE5C;
    --brass-soft: #3A3220;
    --clay: #E38D72;      /* ember */
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}
.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding-block: 1.5rem 4rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Masthead: a brass star, the name in serif, a double rule like a book's title page. */
header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-bottom: 0.9rem;
  margin-bottom: 2.25rem;
  border-bottom: 3px double var(--brass);
}
.brand {
  display: inline-flex;
  align-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary);
  text-decoration: none;
}
.brand::before {
  content: "";
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.45rem;
  background: var(--brass);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
.brand span { color: var(--brass); }
nav.site { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.95rem; }
nav.site a { color: var(--muted); text-decoration: none; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--primary); text-decoration: underline; text-decoration-color: var(--brass); }

a { color: var(--primary); text-decoration-color: var(--brass); text-underline-offset: 0.18em; }
a:hover { color: var(--clay); }
a:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); color: var(--primary); text-wrap: balance; }
h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 0.6rem; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.25rem; }
p, ul, ol { margin: 0 0 1rem; }
li + li { margin-top: 0.3rem; }
li::marker { color: var(--brass); }
strong { color: var(--ink); }
.lead { font-size: 1.1rem; color: var(--muted); }
.meta {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.meta code { text-transform: none; letter-spacing: 0; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--vellum); padding: 0.05em 0.3em; border-radius: 4px; }

/* Cards: the app's card surface on parchment, with an outline instead of a shadow. */
.summary {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brass);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.summary h2 {
  margin-top: 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
}
.summary ul { margin-bottom: 0; }

.apps { display: grid; gap: 1rem; margin: 1.75rem 0 2.25rem; }
@media (min-width: 40rem) { .apps { grid-template-columns: 1fr 1fr; } }
.app {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.25rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.app-head { display: flex; align-items: center; gap: 0.8rem; }
.app-icon {
  width: 3rem;
  height: 3rem;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  background: var(--primary-soft);
  color: var(--primary);
}
img.app-icon { background: none; }
.app h2 { margin: 0; font-size: 1.3rem; }
.app .kind {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
  font-weight: 700;
}
.app p { margin: 0; }
.app .links { margin-top: auto; padding-top: 0.6rem; border-top: 1px solid var(--rule); font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.status {
  align-self: flex-start;
  font-size: 0.8rem;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
}

.table-wrap { overflow-x: auto; margin: 0 0 1rem; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--rule); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 600; background: var(--vellum); color: var(--primary); }

footer.site {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 3px double var(--brass);
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site p { margin: 0 0 0.25rem; }
footer.site a { color: var(--muted); }
