:root {
  --bg: #f3f0e8;
  --surface: #fffcf7;
  --ink: #1c2430;
  --ink-soft: #3e4c5e;
  --muted: #66758a;
  --line: #e4ddd0;
  --teal: #0b6b64;
  --teal-deep: #084e49;
  --teal-soft: #e5f3f1;
  --brass: #8d6b3e;
  --shadow: 0 16px 40px rgba(28, 36, 48, 0.06);
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: Outfit, "Segoe UI", sans-serif;
  --mono: "Cascadia Code", "Segoe UI Mono", ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614;
    --surface: #1c2320;
    --ink: #f4f0e6;
    --ink-soft: #d0d6cf;
    --muted: #a3aea6;
    --line: rgba(255, 255, 255, 0.1);
    --teal: #8fd9d0;
    --teal-deep: #d7f4f0;
    --teal-soft: rgba(143, 217, 208, 0.12);
    --brass: #e0c08a;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(11, 107, 100, 0.08), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(141, 107, 62, 0.1), transparent 55%),
    var(--bg);
}

body.directory {
  display: flex;
  flex-direction: column;
}

h1,
p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(52rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: 4.5rem;
  padding: 0.65rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  display: flex;
}

.brand-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-sub {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

main {
  flex: 1;
  padding-bottom: 3.5rem;
}

.hero {
  padding: 3.5rem 0 0.5rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 4.6rem);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

.lede {
  max-width: 36rem;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.5;
}

.rule {
  display: block;
  width: 3rem;
  height: 2px;
  margin-top: 1.6rem;
  border-radius: 999px;
  background: var(--brass);
}

.count {
  margin: 2rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.list {
  display: grid;
  gap: 0.9rem;
}

.card {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 1rem 1.15rem;
  align-items: center;
  padding: 1.25rem 1.25rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  border-color: color-mix(in srgb, var(--teal) 45%, var(--line));
  transform: translateY(-2px);
}

.card:focus-visible,
.back:focus-visible,
.open-site:focus-visible,
.text-link:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.num {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
}

.mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 14px;
  background: #0b6b64;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.body {
  min-width: 0;
}

.tagline {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 600;
}

.name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.desc {
  display: block;
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  align-items: center;
  margin-top: 0.95rem;
}

.path {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.mode,
.host {
  color: var(--muted);
  font-size: 0.88rem;
}

.host::before {
  content: "·";
  margin-right: 0.8rem;
}

.go {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.card:hover .go {
  border-color: #0b6b64;
  background: #0b6b64;
  color: #fff;
}

.note,
.empty {
  color: var(--muted);
}

.note {
  max-width: 40rem;
  margin: 1.15rem 0 0;
  font-size: 0.92rem;
}

.empty {
  margin-top: 2rem;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: 22px;
  text-align: center;
}

.foot {
  border-top: 1px solid var(--line);
}

.foot-inner {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-height: 4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.status-page {
  padding-top: 4.5rem;
}

.text-link {
  color: var(--teal-deep);
  font-weight: 600;
}

body.is-frame {
  overflow: hidden;
  background: var(--bg);
}

.frame-bar {
  display: flex;
  gap: 1rem;
  align-items: center;
  height: 56px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.back,
.open-site {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: var(--teal-deep);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.back:hover,
.open-site:hover,
.text-link:hover {
  text-decoration: underline;
}

.frame-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frame-stage {
  height: calc(100vh - 56px);
  height: calc(100dvh - 56px);
}

.frame-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

::selection {
  background: #c9ebe6;
  color: #08332f;
}

@media (prefers-color-scheme: dark) {
  ::selection {
    background: #1d4a46;
    color: #f4f0e6;
  }
}

@media (max-width: 680px) {
  .hero {
    padding-top: 2.4rem;
  }

  .card {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .num {
    display: none;
  }

  .mark {
    grid-column: 1;
    grid-row: 1;
  }

  .go {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .body {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .frame-name {
    font-size: 0.95rem;
  }
}

.nav,
.subnav,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.9rem;
}

.nav-link,
.nav-button,
.subnav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-strong,
.subnav a[aria-current="page"] {
  color: var(--teal-deep);
}

.nav-form {
  margin: 0;
}

.nav-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.nav-link:hover,
.nav-button:hover,
.subnav a:hover,
.text-link:hover {
  text-decoration: underline;
}

.narrow {
  max-width: 34rem;
}

body.auth h1 {
  font-size: clamp(2.4rem, 6vw, 3.5rem);
}

.panel {
  margin-top: 1.4rem;
  padding: 1.3rem 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 560;
  letter-spacing: -0.03em;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.95rem;
}

.field label {
  font-size: 0.92rem;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 70%, var(--surface));
  color: var(--ink);
  font: inherit;
}

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

input:focus,
textarea:focus,
select:focus,
.btn:focus-visible,
.nav-link:focus-visible,
.nav-button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.help,
.form-note,
.form-links,
.email-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.form-note,
.form-links {
  margin-top: 1rem;
}

.field-error {
  margin: 0;
  color: #8a2e22;
  font-size: 0.88rem;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid #0b6b64;
  border-radius: 999px;
  background: #0b6b64;
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.alert {
  margin: 1rem 0 0;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.alert.error {
  background: #fde8e4;
  color: #8a2e22;
}

.actions {
  margin-top: 1.3rem;
}

.split {
  display: grid;
  gap: 0 1rem;
}

.card-member {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.badge {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 0.82rem;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem 0.55rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subnav {
  margin-top: 1.2rem;
}

.resend {
  margin-top: 1.2rem;
}

.resend summary {
  cursor: pointer;
  color: var(--teal-deep);
  font-weight: 600;
}

.resend form {
  margin-top: 0.8rem;
}

@media (min-width: 720px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-color-scheme: dark) {
  .alert.error,
  .field-error {
    background: transparent;
    color: #ffb4a8;
  }

  .alert.error {
    background: rgba(255, 120, 100, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .go {
    transition: none;
  }

  .card:hover {
    transform: none;
  }
}
