/* ============================================================
   Shared theme — the look of the main page
   grayish ground · 0/1 rain · floating glow · pill tags
   ============================================================ */

:root {
  --bg: #b9bcc2;
  --ink: #12181f;
  --ink-soft: #3c454f;
  --muted: #66707c;
  --line: rgba(43, 47, 54, .16);
  --card: #fbfcfd;
  --card-2: #eef0f3;
  --accent: #16583f;
  --accent-soft: rgba(22, 88, 63, .12);
  --danger: #a4342c;
  --danger-soft: rgba(164, 52, 44, .10);
  --warn: #8a5a12;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 10px 28px -10px rgba(25, 35, 50, .30), 0 2px 6px rgba(25, 35, 50, .07);
  --pill-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 10px 24px -6px rgba(30,40,55,.22), 0 2px 6px rgba(30,40,55,.08);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* ---------- the moving ground ---------- */
.ground { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.ground .glow { position: absolute; inset: -30%; filter: blur(80px); opacity: .75; }
.ground .glow span { position: absolute; display: block; border-radius: 50%; will-change: transform; }

.g1 {
  width: 60vmax; height: 60vmax; left: -10vmax; top: -12vmax;
  background: radial-gradient(circle at 40% 40%, #f2f4f6, transparent 68%);
  animation: float1 26s ease-in-out infinite alternate;
}
.g2 {
  width: 52vmax; height: 52vmax; right: -12vmax; bottom: -14vmax;
  background: radial-gradient(circle at 60% 55%, #e2e5ea, transparent 70%);
  animation: float2 34s ease-in-out infinite alternate;
}
.g3 {
  width: 40vmax; height: 40vmax; left: 35%; top: 30%; opacity: .5;
  background: radial-gradient(circle at 50% 50%, #d3d7de, transparent 72%);
  animation: float3 44s ease-in-out infinite alternate;
}

@keyframes float1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(9vmax,6vmax,0) scale(1.15); } }
@keyframes float2 { from { transform: translate3d(0,0,0) scale(1.05); } to { transform: translate3d(-8vmax,-7vmax,0) scale(.9); } }
@keyframes float3 { from { transform: translate3d(-6vmax,4vmax,0) scale(.95); } to { transform: translate3d(7vmax,-5vmax,0) scale(1.2); } }

canvas.rain {
  position: fixed; left: 0; top: 0;
  width: 100vw; height: 100dvh;
  display: block; z-index: 1; pointer-events: none;
}

.veil {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(255,255,255,.62) 0%, rgba(255,255,255,.22) 45%, rgba(120,125,133,.26) 100%);
}

/* quiet backdrop for text-heavy pages */
body.quiet canvas.rain { opacity: .30; }
body.quieter canvas.rain { opacity: .16; }

/* ---------- pill tag: the signature element ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 19px;
  border-radius: 999px;
  border: 1px solid rgba(43, 47, 54, .20);
  background: linear-gradient(180deg, #fbfcfd 0%, #eef0f3 100%);
  box-shadow: var(--pill-shadow);
  color: #12211c;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color .3s, box-shadow .3s, color .3s;
}
.tag::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex: 0 0 auto;
}
.tag .arw { font-size: 14px; line-height: 1; color: var(--accent); transition: transform .25s; }
.tag:hover { border-color: rgba(22, 88, 63, .5); box-shadow: var(--pill-shadow), 0 14px 30px -10px rgba(22,88,63,.35); }
.tag:hover .arw { transform: translateX(3px); }
.tag:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* small pill for metadata */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 9px; border: 1px solid var(--line);
  color: var(--ink-soft); background: #fff; font-weight: 650; white-space: nowrap;
}
.pill.ok { color: var(--accent); border-color: rgba(22,88,63,.3); background: var(--accent-soft); }
.pill.grey { color: var(--muted); background: #eef1f4; }
.pill.warn { color: var(--warn); border-color: rgba(138,90,18,.3); background: rgba(138,90,18,.1); }
.pill.bad { color: var(--danger); border-color: rgba(164,52,44,.3); background: var(--danger-soft); }

/* ---------- proprietor credit, top right ---------- */
.proprietor {
  position: fixed; top: 14px; right: 16px; z-index: 40;
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(250, 251, 252, .92);
  border: 1px solid rgba(43, 47, 54, .14);
  box-shadow: 0 6px 18px -8px rgba(25,35,50,.35), 0 1px 0 rgba(255,255,255,.8) inset;
  backdrop-filter: blur(6px);
  pointer-events: none;
  font-family: var(--mono);
}
.proprietor.inline {
  position: static; top: auto; right: auto; z-index: auto;
  pointer-events: auto; box-shadow: 0 2px 8px -4px rgba(25,35,50,.3);
}
.proprietor .pr-label { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #4b5560; opacity: .85; }
.proprietor .pr-name { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; font-size: 15px; letter-spacing: .02em; color: #12211c; }

/* ---------- surfaces ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card + .card { margin-top: 16px; }
.card h3 { font-size: 14px; margin: 0 0 12px; font-weight: 700; color: #0d1319; }

h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; color: #0d1319; }

.kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 8px;
}
.lede { color: var(--ink-soft); max-width: 64ch; margin: 0 0 24px; font-size: 14.5px; }
.muted { color: var(--muted); }
.muted-sm { color: var(--muted); font-size: 12.5px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-family: var(--mono); font-size: 11.5px; font-weight: 650;
  letter-spacing: .07em; text-transform: uppercase;
  border-radius: 8px; padding: 10px 16px; min-height: 38px;
  cursor: pointer; border: 1px solid var(--line);
  background: #fff; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s;
}
.btn:hover { border-color: rgba(22,88,63,.45); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #11452f; border-color: #11452f; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); border-color: rgba(164,52,44,.35); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { min-height: 30px; padding: 6px 11px; font-size: 10.5px; border-radius: 7px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- forms ---------- */
input[type="text"], input[type="password"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; min-height: 42px;
  outline: none; transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(22, 88, 63, .55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.row > .field { margin-bottom: 0; flex: 1 1 160px; min-width: 140px; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: transparent; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 400;
}
tr:last-child td { border-bottom: 0; }
td .sub { display: block; color: var(--muted); font-size: 12px; }

.empty { text-align: center; color: var(--muted); padding: 40px 18px; font-size: 14px; }

/* ---------- page frame shared by every child page ---------- */
.page { position: relative; z-index: 10; max-width: 1120px; margin: 0 auto; padding: 26px 20px 80px; }

.pagetop {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 26px;
}
.pagetop .brand { display: flex; align-items: center; gap: 11px; }
.pagetop .brand-dot {
  width: 11px; height: 11px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft); flex: 0 0 auto;
}
.pagetop .brand b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.pagetop .brand small {
  display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); font-weight: 400;
}
.pagetop .right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: flex-end; }

@media (prefers-reduced-motion: reduce) {
  .ground .glow span { animation: none; }
}

@media (max-width: 640px) {
  .page { padding: 20px 14px 60px; }
  /* header credit: keep the name, drop the label, so the bar still fits */
  .proprietor.inline .pr-label { display: none; }
  .proprietor.inline { padding: 6px 10px; }
  .proprietor { padding: 6px 11px; gap: 6px; }
  .proprietor .pr-label { font-size: 9px; letter-spacing: .12em; }
  .proprietor .pr-name { font-size: 12.5px; }
  .tag { padding: 9px 15px; font-size: 11px; letter-spacing: .1em; }
}


/* ---- "back to main page" pill, used on every child page ---- */
.back.pill-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(250, 251, 252, .92);
  border: 1px solid rgba(43, 47, 54, .14);
  box-shadow: 0 6px 18px -8px rgba(25, 35, 50, .35), 0 1px 0 rgba(255,255,255,.8) inset;
  color: #12211c; text-decoration: none; font-weight: 700;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  white-space: nowrap; transition: border-color .25s, box-shadow .25s;
}
.back.pill-back .arw { font-size: 13px; line-height: 1; color: var(--accent); transition: transform .25s; }
.back.pill-back:hover {
  border-color: rgba(22, 88, 63, .45);
  box-shadow: 0 6px 20px -8px rgba(22, 88, 63, .45), 0 1px 0 rgba(255,255,255,.85) inset;
}
.back.pill-back:hover .arw { transform: translateX(-3px); }
.back.pill-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
