@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/cinzel-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/cinzel-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/cormorant-garamond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --charcoal: #1c1a19;
  --gold-light: #f3d58a;
  --gold: #d4a84b;
  --gold-deep: #b8862f;
  --cream: #f5efe6;
  --cream-muted: #c9bfb0;
  --line: rgba(243, 213, 138, 0.18);
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--cream);
  background: var(--charcoal);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--charcoal); }

a { color: var(--gold-light); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--cream); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--charcoal);
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.eyebrow {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.auth {
  display: grid;
  place-items: center;
  padding: clamp(2.5rem, 8vh, 5rem) 1.25rem 2rem;
}

.auth-card {
  width: min(28rem, 100%);
}

.lede, .fine {
  color: var(--cream-muted);
  margin: 0 0 1rem;
}

.fine { font-size: 0.85rem; margin-top: 1rem; }

.field { margin-bottom: 0.75rem; }

label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

input, textarea, select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(243, 213, 138, 0.22);
  border-radius: 8px;
  background: #141210;
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.45;
}

select {
  cursor: pointer;
  appearance: none;
  background-color: #141210;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.75rem) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}

textarea { resize: vertical; min-height: 8rem; }

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
  min-height: 48px;
  padding: 0.9rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

button.slim { width: auto; margin-top: 0; min-height: 44px; padding: 0.7rem 1.1rem; }
button:hover { filter: brightness(1.05); }

.form-status { min-height: 1.3em; margin: 0.4rem 0 0.6rem; }
.form-status.is-error { color: #f0b4a8; }
.form-status.is-success { color: #b7d7c3; }

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 1.25rem 0 0;
  text-align: center;
}

.auth-links a { font-size: 1.05rem; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.top-side { display: flex; align-items: center; gap: 0.9rem; }
.who { margin: 0; color: var(--cream-muted); font-size: 0.85rem; }

.app { width: min(68rem, calc(100% - 2rem)); margin: 1.5rem auto 2.5rem; }

.app-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.text-link { letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }

.filters {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.9fr auto;
  gap: 0.75rem;
  align-items: end;
  margin: 0.5rem 0 1.25rem;
}

.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
td a { display: inline-block; }
.sub, .when, .meta, .back { color: var(--cream-muted); }
.sub { display: block; font-size: 0.85rem; margin-top: 0.15rem; }
.empty { color: var(--cream-muted); padding: 1.5rem 0.7rem; }

.import-form { margin-top: 1.25rem; }

.meta { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; }
.subject { font-family: var(--font-serif); font-size: 1.45rem; margin: 0.4rem 0 1rem; }
.message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.45;
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.detail-form { width: min(36rem, 100%); }
.back { margin: 0 0 0.8rem; }

.site-footer {
  border-top: 1px solid var(--line);
  background: #141210;
  color: var(--cream-muted);
  text-align: center;
  padding: 1.75rem 1rem 2.25rem;
}
.site-footer p { margin: 0; font-size: 0.85rem; letter-spacing: 0.04em; }

@media (max-width: 800px) {
  .filters { grid-template-columns: 1fr; }
  .top { align-items: flex-start; }
  .top-side { flex-direction: column; align-items: flex-end; }
}
