:root {
  --ink: #172033;
  --muted: #5b667a;
  --line: #d8dee9;
  --paper: #ffffff;
  --soft: #f6f8fb;
  --primary: #be123c;
  --primary-dark: #9f1239;
  --secondary: #2f6f4e;
  --focus: #2563eb;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

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

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

.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.intro {
  display: grid;
  gap: 20px;
  padding: 26px 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.1rem, 9vw, 4.5rem);
}

h2 {
  font-size: clamp(1.45rem, 5vw, 2.25rem);
}

.lede {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.summary-panel {
  display: grid;
  gap: 8px;
  align-content: start;
  border-left: 5px solid var(--secondary);
  background: var(--paper);
  padding: 18px;
  box-shadow: 0 12px 30px rgb(23 32 51 / 0.08);
}

.summary-panel strong {
  font-size: 1.05rem;
}

.summary-panel span {
  color: var(--muted);
  font-size: 0.95rem;
}

form,
.package-section,
.selected-package-panel,
.testing-notice,
.output-section {
  display: grid;
  gap: 18px;
}

.form-section,
.package-section,
.selected-package-panel,
.testing-notice,
.output-section {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 18px;
}

.testing-notice {
  margin-bottom: 18px;
  border-left: 5px solid var(--primary);
}

.testing-notice h2 {
  font-size: clamp(1.35rem, 4vw, 1.9rem);
}

.testing-notice p:not(.eyebrow) {
  max-width: 880px;
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.6;
}

.testing-notice strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.package-grid {
  display: grid;
  gap: 14px;
}

.package-card {
  display: grid;
  min-width: 0;
  gap: 16px;
  align-content: space-between;
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 18px;
}

.package-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.package-name,
.package-price,
.package-summary {
  margin: 0;
}

.package-name {
  font-size: 1rem;
  font-weight: 950;
}

.package-price {
  margin-top: 6px;
  font-size: 2.15rem;
  font-weight: 950;
  letter-spacing: 0;
}

.package-summary {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.5;
}

.package-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.45;
}

.package-select {
  width: 100%;
}

.guidance-grid {
  display: grid;
  gap: 14px;
}

.guidance-card {
  min-width: 0;
  border-left: 5px solid var(--secondary);
  background: #fff;
  padding: 16px;
}

.guidance-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.guidance-card p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 650;
  line-height: 1.55;
}

.guidance-card strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

.section-heading {
  margin-bottom: 18px;
}

.section-note {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.field-grid {
  display: grid;
  gap: 14px;
}

label,
fieldset {
  min-width: 0;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
}

small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  font-weight: 600;
}

input[type="color"] {
  height: 46px;
  padding: 4px;
}

input[type="file"] {
  background: var(--soft);
}

textarea {
  min-height: 102px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: 3px solid color-mix(in srgb, var(--focus) 25%, transparent);
  outline-offset: 2px;
  border-color: var(--focus);
}

.field-error {
  border-color: var(--primary);
  background: #fff1f2;
}

.hours-list {
  display: grid;
  gap: 12px;
}

.hours-row {
  display: grid;
  min-width: 0;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 14px;
}

.day-name {
  font-weight: 950;
}

.closed-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.closed-toggle input {
  width: auto;
}

.hours-row.is-closed select {
  background: #e5e7eb;
  color: var(--muted);
}

.upload-grid {
  display: grid;
  gap: 14px;
}

.upload-card {
  display: grid;
  min-height: 190px;
  align-content: start;
  gap: 8px;
  border: 2px dashed var(--line);
  background: var(--soft);
  padding: 16px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.upload-card:hover,
.upload-card.is-dragover {
  border-color: var(--secondary);
  background: #eef8f1;
  box-shadow: 0 10px 22px rgb(23 32 51 / 0.08);
}

.upload-card input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.upload-title {
  font-size: 1rem;
  font-weight: 950;
}

.upload-help,
.upload-file {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.upload-file {
  color: var(--ink);
}

.upload-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--paper);
}

fieldset {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  border: 1px solid var(--line);
  padding: 14px;
}

legend {
  padding: 0 6px;
  font-weight: 900;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.option input {
  width: auto;
}

.repeat-list {
  display: grid;
  gap: 14px;
}

.repeat-list.spaced {
  margin-top: 18px;
}

.repeat-card {
  display: grid;
  gap: 12px;
  margin: 0;
  background: var(--soft);
}

.repeat-card textarea {
  min-height: 84px;
}

.repeat-list.compact {
  grid-template-columns: 1fr;
}

.actions {
  display: grid;
  gap: 10px;
  margin: 4px 0 18px;
}

.output-actions {
  margin: 0;
}

.status-message {
  min-height: 1.4em;
  margin: 0;
  color: var(--secondary);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

button {
  min-height: 48px;
  border: 0;
  background: var(--primary);
  color: #fff;
  padding: 12px 18px;
  font-weight: 950;
  cursor: pointer;
}

button:hover {
  background: var(--primary-dark);
}

button.secondary {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

button.secondary:hover {
  background: #eef2f7;
}

pre {
  min-height: 220px;
  max-width: 100%;
  overflow: auto;
  margin: 0;
  background: #111827;
  color: #d1fae5;
  padding: 16px;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (min-width: 760px) {
  .page-shell {
    padding: 34px 24px 72px;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: end;
    padding: 36px 0;
  }

  .form-section,
  .package-section,
  .selected-package-panel,
  .testing-notice,
  .output-section {
    padding: 24px;
  }

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

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

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

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

  .package-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

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

  .hours-row {
    grid-template-columns: minmax(130px, 1fr) 110px minmax(150px, 1fr) minmax(150px, 1fr);
    align-items: end;
  }

  .actions {
    grid-template-columns: max-content max-content;
  }
}

@media (min-width: 1040px) {
  .upload-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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