@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/Inter-Regular.otf") format("opentype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/Inter-Medium.otf") format("opentype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/Inter-SemiBold.otf") format("opentype");
}

:root {
  color: #49453e;
  background: #f7f4ee;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #49453e;
  --primary: #6c5e46;
  --muted: #847d60;
  --accent: #8a7a49;
  --line: #cecac4;
  --paper: #fffdf9;
  --background: #f7f4ee;
  --danger: #9a4e43;
  --success: #526b53;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(206, 202, 196, 0.34), transparent 30rem),
    var(--background);
}

.home-splash {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem;
}

.home-title {
  margin: 0;
  text-align: center;
}

.home-title span {
  display: block;
}

.home-title span:first-child {
  font-size: clamp(4rem, 16vw, 10rem);
  font-weight: 600;
  letter-spacing: -0.08em;
}

.home-title span:last-child {
  color: var(--muted);
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--primary);
}

.shell {
  width: min(100% - 2rem, 760px);
  margin: 0 auto;
  padding: 4rem 0 6rem;
}

.shell--wide {
  width: min(100% - 2rem, 1120px);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 18ch;
  margin-bottom: 1rem;
  font-size: clamp(2.1rem, 7vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

h2 {
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 0.3rem;
  font-size: 1rem;
  font-weight: 600;
}

.intro {
  max-width: 58ch;
  margin-bottom: 2.5rem;
  color: var(--primary);
  font-size: 1.02rem;
  line-height: 1.7;
}

.card {
  margin-bottom: 1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid rgba(108, 94, 70, 0.18);
  border-radius: 1.25rem;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 1.25rem 3rem rgba(73, 69, 62, 0.06);
}

.group-head {
  margin-bottom: 1.7rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.field {
  margin: 0 0 1.6rem;
  padding: 0;
  border: 0;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label,
.field legend {
  display: block;
  width: 100%;
  margin-bottom: 0.65rem;
  font-weight: 500;
  line-height: 1.45;
}

.required {
  color: var(--danger);
}

input[type="text"],
input[type="email"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  outline: none;
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input[type="text"],
input[type="email"],
input[type="datetime-local"],
select {
  min-height: 3.05rem;
  padding: 0 0.85rem;
}

textarea {
  min-height: 21rem;
  padding: 0.85rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138, 122, 73, 0.14);
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.55rem 0;
  line-height: 1.5;
  cursor: pointer;
}

.choice input {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.button-row,
.page-head,
.survey-row,
.status-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.button-row,
.page-head {
  justify-content: space-between;
}

.button-row {
  margin-top: 1.5rem;
}

.external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.certificate-card {
  text-align: center;
}

.certificate-card h1,
.certificate-card .intro {
  margin-right: auto;
  margin-left: auto;
}

.certificate-download {
  min-height: 3.5rem;
  padding: 0.85rem 1.6rem;
  font-size: 1.05rem;
}

.certificate-social {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.certificate-social .external-links {
  justify-content: center;
}

.button {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 120ms ease, transform 120ms ease, background 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--ink);
}

.button:disabled {
  opacity: 0.55;
  transform: none;
  cursor: wait;
}

.button--quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--primary);
}

.button--quiet:hover {
  background: rgba(206, 202, 196, 0.25);
}

.button--small {
  min-height: 2.2rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.notice {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 253, 249, 0.75);
  line-height: 1.55;
}

.notice--error {
  border-color: rgba(154, 78, 67, 0.38);
  color: var(--danger);
}

.notice--success {
  border-color: rgba(82, 107, 83, 0.35);
  color: var(--success);
}

.loader {
  width: 2rem;
  height: 2rem;
  margin: 5rem auto;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.page-head {
  margin-bottom: 2rem;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.survey-list {
  display: grid;
  gap: 0.8rem;
}

.survey-row {
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(108, 94, 70, 0.18);
  border-radius: 0.9rem;
  background: var(--paper);
}

.survey-row h3,
.survey-row p {
  margin: 0;
}

.survey-row p,
.muted,
.hint {
  color: var(--muted);
}

.survey-row p,
.hint {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

.survey-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
}

.survey-actions .button {
  min-height: 2.35rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.84rem;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--line);
}

.status-dot--on {
  background: var(--success);
}

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

.form-grid .field {
  margin: 0;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
}

.toggle input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.editor-section {
  margin-top: 1.5rem;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.field-head .field-label {
  width: auto;
  margin: 0;
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 1rem, 760px);
    padding-top: 2rem;
  }

  .card {
    border-radius: 0.9rem;
  }

  .page-head,
  .survey-row {
    align-items: flex-start;
  }

  .survey-row {
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
