:root {
  --bg: #f7f7f7;
  --ink: #111111;
  --muted: #4a4a4a;
  --line: #e0e0e0;
  --white: #fff;
  --green-bg: #f7f7f7;
  --green-border: #e0e0e0;
  --green-head: #111111;
  --green-ink: #ffffff;
  --gold: #d4a012;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Montserrat', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #f5f5f5;
}

.login-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 2rem;
  width: 100%;
  max-width: 22rem;
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
}

.login-card h1 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: .25rem;
}

.login-sub {
  color: var(--muted);
  font-size: .875rem;
  margin-bottom: 1.5rem;
}

.login-card input {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  font-size: .875rem;
  margin-bottom: .75rem;
}

.login-card input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 0;
}

.login-card button {
  width: 100%;
  padding: .75rem;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: .75rem;
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
}

.login-card button:hover { background: #262626; }

.login-error {
  color: #dc2626;
  font-size: .875rem;
  margin-bottom: .5rem;
}

body.st-brand .st-eyebrow-dark {
  color: var(--muted);
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

/* Header (legacy — catering uses st-preview-bar) */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .wrap { padding: 0 2rem; } }

.brand-link {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: .75rem;
}

.brand-link:hover { color: var(--ink); }

.eyebrow {
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: .25rem;
}

.site-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 600;
}

.intro {
  margin-top: .5rem;
  color: var(--muted);
  font-size: .9375rem;
  max-width: 36rem;
}

/* Main */
.main {
  padding: 2rem 0 2.5rem;
  background: #fff;
}

.compare {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  margin-bottom: 2rem;
  overflow: hidden;
}

.compare summary {
  padding: .75rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}

.compare summary:hover { background: #fafafa; }

.compare img {
  display: block;
  width: 100%;
  max-width: 36rem;
  height: auto;
  margin: 0 1rem 1rem;
  border-radius: 0;
  border: 1px solid var(--line);
}

.form-section,
.results-section {
  min-width: 0;
}

.form-section {
  background: #fff;
  color: var(--ink);
  padding: 0;
}

@media (min-width: 768px) {
  .form-section { padding: 0; }
}

.layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.layout.has-results {
  gap: 2.5rem;
}

@media (max-width: 1023px) {
  .layout.has-results .results-section {
    border-top: 1px solid var(--line);
    padding-top: 2rem;
    margin-top: .5rem;
  }
}

@media (min-width: 1024px) {
  .layout.has-results {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 2.5rem;
    align-items: start;
  }

  /* Side panel — sheet scrolls horizontally on narrow columns */
  .layout.has-results .gs-scroll {
    max-width: 100%;
  }
}

@media (min-width: 1280px) {
  .layout.has-results .gs-cell-wrap {
    max-width: 14rem;
  }
}

.form-section h2,
.results-section h2 {
  font-family: var(--sans);
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: .25rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .form-section h2,
  .results-section h2 { font-size: 1.625rem; }
}

.section-sub {
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  max-width: 32rem;
}

/* Form blocks */
.form-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: none;
  color: var(--ink);
}

@media (min-width: 768px) { .form-block { padding: 1.5rem; } }

.form-block h3.block-heading {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .form-block h3.block-heading { font-size: 1.75rem; }
}

.form-block h3 {
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.event-grid {
  display: grid;
  gap: 0;
}

@media (min-width: 768px) {
  .event-grid { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
  .field-wide { grid-column: 1 / -1; }
}

.field { margin-bottom: 1rem; }

.field label {
  display: block;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: .375rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .625rem .75rem;
  border: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--sans);
  font-size: .875rem;
  background: #fff;
  color: var(--ink);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.field input[type="time"] {
  min-height: 2.75rem;
  color: var(--ink);
}

.field input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 0;
}

.check-group { margin-bottom: 1.25rem; }
.check-group:last-child { margin-bottom: 0; }

.check-group > p {
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: .5rem;
}

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }

.chip {
  padding: .5rem .875rem;
  min-height: 2.75rem;
  border-radius: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: .8125rem;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.chip.selected {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.form-note {
  text-align: center;
  font-family: var(--sans);
  font-size: .75rem;
  color: var(--muted);
  margin: 1rem 0;
}

.submit-btn {
  width: 100%;
  padding: .9375rem 2rem;
  min-height: 2.75rem;
  background: transparent;
  color: var(--ink);
  border: 3px double var(--ink);
  border-radius: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

.submit-btn:hover {
  background: var(--ink);
  color: #fff;
}

/* Results */
.results-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  scroll-margin-top: 1rem;
}

.results-section > *,
.results-section .confirm-card,
.results-section .sheet-card,
.results-section .email-card,
.results-section .reset-btn {
  flex-shrink: 0;
}

.results-section > div:first-child {
  padding-bottom: .25rem;
}

.sheet-card,
.email-card {
  min-width: 0;
}

.sheet-card {
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: var(--bg);
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white);
}

.sheet-hint {
  font-size: .75rem;
  color: var(--muted);
  padding: .875rem 1rem 0;
  line-height: 1.5;
}

/* Google Sheets workbook preview */
.gs-workbook {
  margin: .75rem 1rem 1rem;
  border: 1px solid #dadce0;
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
}

.gs-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  padding: 0 .5rem;
  background: #f8f9fa;
  border-bottom: 1px solid #dadce0;
  min-height: 2rem;
}

.gs-tab {
  font-family: Arial, Helvetica, sans-serif;
  font-size: .6875rem;
  color: #5f6368;
  padding: .5rem .875rem .375rem;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -1px;
}

.gs-tab-active {
  background: #fff;
  color: #188038;
  font-weight: 600;
  border-color: #dadce0;
  border-top: 3px solid #188038;
  padding-top: calc(.5rem - 2px);
}

.gs-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.gs-table {
  border-collapse: collapse;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.35;
  min-width: 100%;
  width: max-content;
  color: #202124;
}

.gs-table th,
.gs-table td {
  border: 1px solid #dadce0;
  padding: 4px 8px;
  vertical-align: middle;
  white-space: nowrap;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-cell-wrap {
  white-space: normal !important;
  max-width: 10rem;
  min-width: 7rem;
}

.gs-corner,
.gs-col-letter,
.gs-rownum {
  background: #f8f9fa;
  color: #70757a;
  font-weight: 400;
  text-align: center;
  user-select: none;
}

.gs-corner {
  width: 2.25rem;
  min-width: 2.25rem;
}

.gs-rownum {
  width: 2.25rem;
  min-width: 2.25rem;
}

.gs-col-letter {
  min-width: 4.5rem;
  font-size: 10px;
}

.gs-headers th {
  background: #f3f3f3;
  color: #202124;
  font-weight: 600;
  text-align: left;
}

.gs-data td {
  background: #fff;
}

.gs-data .gs-rownum {
  font-weight: 500;
}

.gs-badge {
  display: inline-block;
  background: #e6f4ea;
  color: #137333;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 2px;
}

@media (max-width: 639px) {
  .gs-workbook {
    margin-left: .75rem;
    margin-right: .75rem;
  }

  .gs-table th,
  .gs-table td {
    font-size: 10px;
    padding: 3px 6px;
  }

  .gs-scroll-hint {
    display: block;
  }
}

.gs-scroll-hint {
  display: none;
  margin: 0;
  padding: .5rem .75rem .75rem;
  font-size: .6875rem;
  color: #70757a;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

.badge-new {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: .75rem;
  font-weight: 600;
  padding: .125rem .5rem;
  border-radius: 0;
}

.email-card {
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: var(--white);
  box-shadow: none;
}

.email-head {
  padding: .75rem 1rem;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white);
}

.email-body {
  padding: 1rem;
  font-size: .875rem;
}

.email-subject {
  color: var(--muted);
  margin-bottom: .75rem;
  word-break: break-word;
  font-size: .8125rem;
  line-height: 1.5;
}

.email-subject strong { color: var(--ink); }

.email-text {
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 1rem;
  font-size: .8125rem;
  line-height: 1.65;
  color: var(--muted);
  overflow-wrap: anywhere;
  max-width: 100%;
}

/* Customer confirmation */
.results-intro {
  margin-bottom: .25rem;
}

.results-intro h2 {
  font-family: var(--sans);
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: .375rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .results-intro h2 { font-size: 1.625rem; }
}

.results-intro-sub {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.preview-label {
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .625rem;
}

.confirm-card {
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: var(--white);
}

.confirm-body {
  padding: 1.5rem;
}

.confirm-title {
  font-family: var(--sans);
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

@media (min-width: 768px) {
  .confirm-title { font-size: 1.625rem; }
}

.confirm-card h2 {
  font-family: var(--sans);
  font-size: 1.625rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

.confirm-lead {
  font-family: var(--sans);
  font-size: .9375rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.confirm-summary {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.confirm-row + .confirm-row {
  margin-top: .75rem;
}

.confirm-row dt {
  font-family: var(--sans);
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .25rem;
}

.confirm-row dd {
  font-family: var(--sans);
  font-size: .9375rem;
  line-height: 1.5;
}

.confirm-note {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.6;
}

body.st-brand .site-footer a {
  color: rgba(255,255,255,.9);
  text-decoration: none;
}

body.st-brand .site-footer a:hover {
  text-decoration: underline;
}

.reset-btn {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;
  padding: .5rem 0;
  min-height: 2.75rem;
}

.reset-btn:hover { color: var(--ink); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
}
