:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #162033;
  --muted: #657286;
  --line: #dfe5ef;
  --accent: #0f766e;
  --accent-strong: #115e59;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.narrow {
  width: min(760px, calc(100% - 32px));
}

.topbar,
.row,
.subtop,
.actions,
.auth-top,
.language-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.actions.left {
  justify-content: flex-start;
}

.eyebrow,
.muted,
small {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
}

h2 {
  margin: 28px 0 12px;
  font-size: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-strong);
}

.button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.button.secondary {
  background: #164e63;
}

.button.secondary:hover {
  background: #0e7490;
}

.ghost-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button.compact,
.ghost-button.compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.ghost-button.compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inline-form {
  margin: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.language-switch {
  justify-content: flex-start;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 4px;
}

.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 32px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.language-switch a.active {
  background: var(--accent);
  color: white;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 28px;
}

.auth-card h1 {
  margin-bottom: 10px;
}

.auth-top {
  margin-bottom: 24px;
}

.error {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #be123c;
  padding: 10px 12px;
  font-weight: 700;
}

.success {
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  padding: 10px 12px;
  font-weight: 700;
}

.subtop {
  margin-bottom: 18px;
}

.metrics,
.grid,
.columns {
  display: grid;
  gap: 14px;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0;
}

.metrics article,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  margin-bottom: 12px;
}

.card p:last-child {
  margin-bottom: 0;
}

.checklist {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding-left: 22px;
}

.copy-block,
.publish-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.schedule-list {
  display: grid;
  gap: 10px;
}

.schedule-card h2 {
  margin-top: 0;
}

.schedule-day {
  display: grid;
  gap: 6px;
  padding-top: 10px;
}

.schedule-day + .schedule-day {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.schedule-day h3 {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--text);
  padding: 12px 0;
}

.schedule-item.due {
  border-radius: 8px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  padding: 12px;
}

.schedule-item:first-child {
  border-top: 0;
}

.schedule-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.schedule-item small {
  display: block;
}

.schedule-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.definition-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.definition-list div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
}

.definition-list dt {
  color: var(--muted);
  font-weight: 800;
}

.definition-list dd {
  min-width: 0;
  margin: 0;
}

code {
  overflow-wrap: anywhere;
  color: #0f766e;
}

.connection-list {
  display: grid;
  gap: 10px;
}

.connection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.connection-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.connection-item small {
  display: block;
  margin-top: 4px;
}

pre {
  margin: 12px 0 0;
  white-space: pre-wrap;
  font-family: inherit;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: #dff5ef;
  color: #0b5a50;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1.4fr 0.7fr 0.7fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.table-head {
  background: #edf2f8;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-row {
  border-top: 1px solid var(--line);
  color: var(--text);
}

.table-empty {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 16px;
}

.table-row small {
  display: block;
  margin-top: 4px;
}

.back {
  display: inline-block;
  margin-bottom: 18px;
}

.form {
  display: grid;
  gap: 14px;
}

.generator-form {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 0.8fr) auto;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-preview {
  display: block;
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #07111f;
  object-fit: cover;
}

.contact-sheet {
  display: block;
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #07111f;
}

.public-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 56px;
}

.brand-lockup,
.public-nav,
.policy-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup {
  color: var(--text);
  font-weight: 800;
}

.brand-lockup img,
.policy-brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.public-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 48px;
  margin-bottom: 42px;
}

.public-hero h1 {
  margin-bottom: 18px;
  font-size: 48px;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.public-icon {
  width: 220px;
  height: 220px;
  border-radius: 24px;
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.16);
}

.public-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.public-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

.public-grid h2,
.policy-page h2 {
  margin-top: 0;
}

.policy-brand {
  margin-bottom: 20px;
}

@media (max-width: 760px) {
  .topbar,
  .public-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions,
  .subtop {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics,
  .grid,
  .columns,
  .generator-form,
  .public-hero,
  .public-grid {
    grid-template-columns: 1fr;
  }

  .public-hero h1 {
    font-size: 36px;
  }

  .public-icon {
    width: 140px;
    height: 140px;
  }

  .table {
    overflow-x: auto;
  }

  .table-head,
  .table-row {
    min-width: 720px;
  }

  .schedule-item {
    grid-template-columns: 1fr;
  }

  .schedule-item small {
    grid-column: auto;
  }

  .schedule-actions {
    justify-content: flex-start;
  }

  .definition-list div,
  .connection-item {
    grid-template-columns: 1fr;
  }

  .connection-item {
    align-items: flex-start;
    flex-direction: column;
  }
}
