:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface-1: #141414;
  --surface-2: #232323;
  --surface-3: #1a1a1a;
  --border: #2a2a2a;
  --border-strong: #3a3a3a;
  --divider: #242424;
  --text: #f2f2f2;
  --text-secondary: #b9b9b9;
  --text-muted: #8a8a8a;
  --green: #52a98a;
  --green-bg: #0f1f18;
  --green-border: #1e4a3a;
  --amber: #cfad69;
  --amber-bg: #2b1d10;
  --amber-border: #6b3b1a;
  --gray: #c7c7c7;
  --gray-bg: #1b1b1b;
  --gray-border: #3a3a3a;
  --shadow-panel: 0 8px 24px rgba(0, 0, 0, 0.45);
  --radius-panel: 14px;
  --radius-input: 12px;
  --font-display: "Fraunces", serif;
  --font-hero: "Bebas Neue", sans-serif;
  --font-sans: "Manrope", sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --z-base: 0;
  --z-surface: 1;
  --z-sticky: 2;
  --z-overlay: 3;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f8f5ef;
  --surface-1: #f3eee5;
  --surface-2: #eee7db;
  --surface-3: #f0ebe2;
  --border: #d8d1c5;
  --border-strong: #c7bfaf;
  --divider: #e0d9cd;
  --text: #1f1a14;
  --text-secondary: #4a433b;
  --text-muted: #6b6258;
  --green: #2f7f62;
  --green-bg: #e3f0e7;
  --green-border: #7bb79c;
  --amber: #b9821f;
  --amber-bg: #f6ead2;
  --amber-border: #d7b47f;
  --gray: #6e655b;
  --gray-bg: #efe7db;
  --gray-border: #cdbfae;
  --shadow-panel: 0 8px 24px rgba(28, 21, 14, 0.08);
}

* {
  box-sizing: border-box;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  line-height: 1.5;
  text-wrap: pretty;
}


a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--text-secondary);
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 48px;
  width: 100%;
}

.main {
  flex: 1;
  padding-top: clamp(48px, 7vw, 64px);
  padding-bottom: var(--space-8);
  position: relative;
  z-index: var(--z-surface);
}

.brand-row {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.brand-mark {
  background-color: var(--surface-1);
  background-image: url("/favicon.png");
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.brand-name {
  white-space: nowrap;
}

.size-28 {
  width: 28px;
  height: 28px;
}

.size-20 {
  width: 20px;
  height: 20px;
}

.size-16 {
  width: 16px;
  height: 16px;
}

.size-14 {
  width: 14px;
  height: 14px;
}

.size-12 {
  width: 12px;
  height: 12px;
}

.site-footer {
  border-top: 1px solid var(--divider);
  padding: var(--space-5) 0 var(--space-7);
  color: var(--text-muted);
  font-size: 12px;
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-copy {
  max-width: 520px;
}

.footer-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.theme-toggle {
  height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.theme-toggle:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.theme-toggle__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--text-muted);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.theme-toggle[aria-pressed="true"] .theme-toggle__dot {
  background: var(--amber);
  box-shadow: 0 0 0 2px rgba(207, 173, 105, 0.18);
}

:root[data-theme="light"] .theme-toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
}

.site-footer p {
  margin: 0 0 var(--space-2);
}

@media (max-width: 900px) {
  .container {
    padding: 0 24px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Correction Modal */
.correction-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
  pointer-events: none;
}

.correction-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.correction-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.correction-modal__content {
  position: relative;
  z-index: var(--z-overlay);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  margin: var(--space-4);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 180ms ease;
}

.correction-modal.is-open .correction-modal__content {
  transform: translateY(0);
}

.correction-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--divider);
}

.correction-modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
}

.correction-modal__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.correction-modal__close:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
  color: var(--text);
}

.correction-form {
  padding: var(--space-5);
  overflow-y: auto;
  flex: 1;
}

.correction-form__honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.correction-form__intro {
  margin: 0 0 var(--space-4);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.correction-form__field {
  margin-bottom: var(--space-4);
}

.correction-form__field:last-of-type {
  margin-bottom: var(--space-5);
}

.correction-form__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.correction-form__required {
  color: var(--amber);
}

.correction-form__optional {
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

.correction-form__input,
.correction-form__textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.correction-form__input:focus,
.correction-form__textarea:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  background: var(--surface-3);
}

.correction-form__input::placeholder,
.correction-form__textarea::placeholder {
  color: var(--text-muted);
}

.correction-form__textarea {
  resize: vertical;
  min-height: 80px;
}

.correction-form__message {
  padding: var(--space-3);
  border-radius: var(--radius-input);
  font-size: 13px;
  margin-bottom: var(--space-4);
  display: none;
}

.correction-form__message.is-success {
  display: block;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  color: var(--green);
}

.correction-form__message.is-error {
  display: block;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber);
}

.correction-form__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  padding-top: var(--space-4);
  border-top: 1px solid var(--divider);
}

.correction-form__cancel,
.correction-form__submit {
  height: 40px;
  padding: 0 var(--space-4);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.correction-form__cancel {
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-secondary);
}

.correction-form__cancel:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.correction-form__submit {
  border: 1px solid var(--amber-border);
  background: rgba(207, 173, 105, 0.12);
  color: var(--amber);
  box-shadow: inset 0 0 0 1px rgba(207, 173, 105, 0.18);
}

.correction-form__submit:hover:not(:disabled) {
  background: rgba(207, 173, 105, 0.18);
  border-color: var(--amber);
}

.correction-form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.correction-cta {
  height: 32px;
  border-radius: 999px;
  padding: 0 14px;
  border: 1px solid #c94a4a;
  background: rgba(201, 74, 74, 0.12);
  color: #e05555;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(201, 74, 74, 0.18);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.correction-cta:hover {
  background: rgba(201, 74, 74, 0.2);
  border-color: #e05555;
  color: #f06565;
}

.correction-cta:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(201, 74, 74, 0.18), 0 0 0 2px rgba(201, 74, 74, 0.3);
}

:root[data-theme="light"] .correction-cta {
  border-color: #b54343;
  background: rgba(181, 67, 67, 0.1);
  color: #a83c3c;
  box-shadow: inset 0 0 0 1px rgba(181, 67, 67, 0.15);
}

:root[data-theme="light"] .correction-cta:hover {
  background: rgba(181, 67, 67, 0.18);
  border-color: #a83c3c;
  color: #942e2e;
}

:root[data-theme="light"] .correction-cta:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(181, 67, 67, 0.15), 0 0 0 2px rgba(181, 67, 67, 0.25);
}

@media (max-width: 640px) {
  .correction-modal__content {
    margin: var(--space-2);
    max-height: 95vh;
  }

  .correction-modal__header {
    padding: var(--space-4);
  }

  .correction-form {
    padding: var(--space-4);
  }

  .correction-form__actions {
    flex-direction: column-reverse;
  }

  .correction-form__cancel,
  .correction-form__submit {
    width: 100%;
  }
}
