/* internal.css — the "Executive Suite": a private, corporate-chic design
   system for Sean's internal reference pages (board / care team / vaccines).
   Deliberately distinct from the warm public site: deep charcoal, champagne
   gold, and a quiet annual-report feel. Framework-free. */

:root {
  --ibg: #0e1116;
  --ibg-2: #0b0e12;
  --panel: #161a21;
  --panel-2: #1b212b;
  --panel-3: #212936;
  --line: #2a323d;
  --line-soft: #222932;
  --text: #eceae4;
  --muted: #9aa0ab;
  --muted-2: #6f757f;
  --gold: #c9a86a;
  --gold-2: #e0c489;
  --gold-dim: #8f7842;
  --green: #6fbf8f;
  --amber: #e0b25a;
  --red: #d97a6a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", "Roboto Mono", Menlo,
    Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  min-height: 100vh;
  background: var(--ibg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(50rem 26rem at 50% -8rem,
      rgba(201, 168, 106, 0.10), transparent 70%),
    linear-gradient(180deg, #10141a, #0e1116 40%);
  background-attachment: fixed;
}

::selection { background: rgba(201, 168, 106, 0.28); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Top bar ---------- */
.inav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ibg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.inav-inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

.inav .crest {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.inav .crest .mark {
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.85rem;
  background: rgba(201, 168, 106, 0.08);
}

.inav-links { display: flex; align-items: center; gap: 1.25rem; }

.inav-links a, .inav-links button {
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 550;
  transition: color 0.2s ease;
}

.inav-links a:hover, .inav-links button:hover { color: var(--gold); }

/* ---------- Layout ---------- */
.wrap {
  position: relative;
  max-width: 60rem;
  margin: 0 auto;
  padding: 3.25rem 1.5rem 4rem;
}

.wrap.narrow { max-width: 48rem; }

/* ---------- Password gate ---------- */
.gate {
  max-width: 23rem;
  margin: 6rem auto;
  text-align: center;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2.75rem 2rem;
  box-shadow: var(--shadow);
}

.gate .seal {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.5rem;
  background: rgba(201, 168, 106, 0.08);
}

.gate h1 { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 0.3rem; }
.gate .kick {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--gold); margin-bottom: 0.9rem; font-weight: 600;
}
.gate p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.gate form { display: flex; flex-direction: column; gap: 0.7rem; }

.gate input {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ibg-2);
  color: var(--text);
  font-size: 1rem;
  text-align: center;
}

.gate-error {
  color: var(--red); font-size: 0.85rem; min-height: 1.2rem; margin-top: 0.2rem;
}

.shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #23180a;
  box-shadow: 0 6px 18px rgba(201, 168, 106, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(201, 168, 106, 0.32); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--line); cursor: pointer; font: inherit;
  font-weight: 600; font-size: 0.82rem; padding: 0.45rem 0.95rem;
  border-radius: 999px; background: var(--panel-2); color: var(--muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold); }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.75rem; }

/* ---------- Page header ---------- */
.phead { margin-bottom: 2.5rem; }
.phead .eyebrow {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.24em;
  color: var(--gold); font-weight: 600; margin-bottom: 0.5rem;
}
.phead h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw + 0.6rem, 2.7rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.01em;
}
.phead .sub { color: var(--muted); max-width: 42rem; margin-top: 0.6rem; }

.phead-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}

.hairline {
  height: 1px; border: 0; margin: 1.4rem 0 0;
  background: linear-gradient(90deg, var(--gold-dim), transparent 60%);
}

/* ---------- Section labels ---------- */
.slabel {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--muted-2); font-weight: 600;
  display: flex; align-items: center; gap: 0.75rem; margin: 2.25rem 0 1rem;
}
.slabel::after {
  content: ""; flex: 1; height: 1px; background: var(--line-soft);
}

/* ---------- Generic panel ---------- */
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
}

/* ---------- Stat strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem; margin-bottom: 2rem;
}
.stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 0.9rem 1rem; text-align: center;
}
.stat .value { font-family: var(--serif); font-size: 1.7rem; color: var(--gold-2); line-height: 1.2; }
.stat .label {
  font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem;
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* ---------- Inline edit form ---------- */
.editor {
  background: var(--panel-2); border: 1px solid var(--gold-dim);
  border-radius: 14px; padding: 1.25rem; margin-bottom: 1.5rem;
}
.editor[hidden] { display: none; }
.form-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 540px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
  display: block; font-size: 0.72rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3rem;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--line);
  border-radius: 9px; background: var(--ibg-2); color: var(--text);
  font: inherit; font-size: 0.92rem;
}
.field textarea { resize: vertical; min-height: 3.2rem; }
.field label .hint { text-transform: none; letter-spacing: 0; color: var(--muted-2); font-weight: 400; }
.editor-actions {
  display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1rem;
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center; color: var(--muted-2); border: 1px dashed var(--line);
  border-radius: 14px; padding: 2.5rem 1.5rem; background: rgba(255,255,255,0.01);
}
.empty .big { font-size: 1.8rem; margin-bottom: 0.4rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(1.5rem);
  background: var(--panel-3); color: var(--text); border: 1px solid var(--line);
  padding: 0.6rem 1.1rem; border-radius: 999px; font-size: 0.85rem;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Footer ---------- */
.ifoot {
  margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line-soft);
  text-align: center; font-size: 0.8rem; color: var(--muted-2);
}
.ifoot .lock-note { color: var(--muted-2); }

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: fade-up 0.5s ease both; }
  @keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
}
