:root {
  --ink: #17201b;
  --muted: #5d6963;
  --line: #d7ded7;
  --paper: #fbfbf6;
  --panel: #ffffff;
  --field: #f3f6f1;
  --green: #1f6b4a;
  --green-2: #124d38;
  --gold: #c48a31;
  --red: #b8472e;
  --blue: #286f9f;
  --shadow: 0 20px 60px rgba(23, 32, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
a,
summary {
  touch-action: manipulation;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(215, 222, 215, 0.82);
  background: rgba(251, 251, 246, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.main-nav a:hover {
  color: var(--ink);
}

.header-action,
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.header-action {
  border-color: var(--line);
  background: #fff;
  color: var(--green);
}

.button:hover,
.header-action:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--green);
  color: #fff;
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.button.full {
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 6vw, 72px);
  min-height: calc(100vh - 76px);
  align-items: center;
  padding: clamp(34px, 6vw, 84px) clamp(18px, 5vw, 72px) 46px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 10%, rgba(196, 138, 49, 0.16), transparent 30%),
    linear-gradient(135deg, #fbfbf6 0%, #f1f5ec 52%, #fff 100%);
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.lede {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 740px;
  margin: 0;
}

.trust-row div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.trust-row dt {
  font-weight: 800;
}

.trust-row dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.shipping-visual {
  position: relative;
  min-height: 480px;
}

.label-sheet {
  position: absolute;
  inset: 20px 8px auto auto;
  width: min(100%, 430px);
  min-height: 420px;
  padding: 28px;
  border: 1px solid #151a17;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.label-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 18px;
  font-weight: 800;
}

.barcode {
  display: flex;
  height: 90px;
  align-items: stretch;
  gap: 6px;
  margin: 28px 0;
}

.barcode span {
  flex: 1;
  background: var(--ink);
}

.barcode span:nth-child(2n) {
  flex: 0.45;
}

.barcode span:nth-child(3n) {
  flex: 0.25;
}

.route-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.route-grid div,
.package-stamp span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--field);
}

.route-grid small,
.route-grid strong {
  display: block;
}

.route-grid small {
  color: var(--muted);
}

.package-stamp {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.package-stamp span {
  color: var(--green-2);
  font-weight: 800;
}

.status-card {
  position: absolute;
  right: 0;
  bottom: 20px;
  display: flex;
  max-width: 330px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(23, 32, 27, 0.1);
}

.status-card p {
  margin: 0;
  font-weight: 700;
}

.pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(196, 138, 49, 0.18);
}

.quote-shell,
.operations,
.tracking,
.admin-panel,
.safety {
  padding: clamp(52px, 7vw, 96px) clamp(18px, 5vw, 72px);
}

.quote-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(320px, 1fr);
  gap: clamp(22px, 5vw, 64px);
  align-items: start;
  background: #fff;
}

.section-intro {
  max-width: 620px;
}

.section-intro p:not(.eyebrow),
.safety p {
  color: var(--muted);
  font-size: 17px;
}

.quote-form,
.admin-panel,
.tracking,
.safety {
  border-top: 1px solid var(--line);
}

.quote-form {
  display: grid;
  gap: 18px;
}

.quote-result {
  border: 1px solid #bdd3c3;
  border-radius: 8px;
  padding: 16px;
  background: #eef8ef;
}

.quote-result p {
  margin: 6px 0 14px;
  color: var(--muted);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quote-summary,
.breakdown-list {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

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

.quote-summary div,
.breakdown-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.quote-summary dt,
.breakdown-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quote-summary dd,
.breakdown-list dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 850;
}

.error-list {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--red);
  font-weight: 750;
}

fieldset {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--paper);
}

legend {
  padding: 0 8px;
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 107, 74, 0.14);
}

.wide {
  grid-column: 1 / -1;
}

.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.check-row input {
  width: 20px;
  margin-top: 2px;
}

.form-note {
  color: var(--muted);
  font-size: 13px;
}

.operations {
  background: var(--paper);
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.ops-grid article {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
}

.ops-grid p {
  color: var(--muted);
}

.icon-box {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 26px;
  border-radius: 8px;
  background: #e5eee7;
  color: var(--green);
  font-weight: 900;
}

.safety {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(320px, 1fr);
  gap: clamp(22px, 5vw, 64px);
  background: #fff;
}

.safety-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.safety-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  background: var(--paper);
  font-weight: 750;
}

.tracking-form {
  display: flex;
  gap: 12px;
  max-width: 680px;
  align-items: end;
}

.tracking-form label {
  flex: 1;
}

.admin-panel {
  background: #f6f8f3;
}

.admin-lock {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(260px, 0.42fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
}

.admin-lock[hidden],
.admin-workspace[hidden] {
  display: none;
}

.pin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-header {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.launch-status {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.launch-status > strong {
  font-size: 15px;
}

.launch-status > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.launch-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.launch-pill.ready {
  background: #e8f4e9;
  color: var(--green-2);
}

.launch-pill.missing {
  background: #fff3dc;
  color: #8a5a13;
}

.settings-grid,
.metric-row,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.pricing-settings {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px 16px;
  background: #fff;
}

.pricing-settings summary {
  cursor: pointer;
  color: var(--green-2);
  font-weight: 850;
}

.pricing-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 16px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.metric strong {
  display: block;
  font-size: 26px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.request-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.request-card {
  display: grid;
  grid-template-columns: minmax(250px, 0.82fr) minmax(280px, 1fr) minmax(230px, 0.72fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(23, 32, 27, 0.06);
}

.request-card p {
  margin-bottom: 7px;
  overflow-wrap: anywhere;
}

.request-card small {
  color: var(--muted);
}

.review-note {
  margin-top: 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 750;
}

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

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #eef3eb;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 800;
}

.badge.warn {
  background: #fff3dc;
  color: #8a5a13;
}

.badge.risk {
  background: #fae4df;
  color: var(--red);
}

.card-actions {
  display: grid;
  gap: 8px;
}

.card-actions select,
.card-actions input {
  min-height: 40px;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
  font-weight: 800;
}

.mini-button.strong {
  background: var(--green);
  color: #fff;
}

.proposal-details {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.proposal-details summary {
  cursor: pointer;
  color: var(--green-2);
  font-weight: 850;
}

.proposal-sheet {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.proposal-topline {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 12px;
  font-weight: 900;
}

.proposal-total {
  display: grid;
  gap: 3px;
  margin: 14px 0;
  border-radius: 8px;
  padding: 14px;
  background: var(--field);
}

.proposal-total span,
.proposal-total small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.proposal-total strong {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1;
}

.proposal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.proposal-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--paper);
}

.proposal-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.proposal-grid dd {
  margin: 2px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.proposal-note {
  margin: 12px 0;
  border-radius: 8px;
  padding: 12px;
  background: #eef8ef;
  color: var(--green-2);
  font-weight: 800;
}

.proposal-note.risk {
  background: #fae4df;
  color: var(--red);
}

.empty-state {
  border: 1px dashed #aeb9af;
  border-radius: 8px;
  padding: 28px;
  background: #fff;
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  padding: 24px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
}

.site-footer span {
  color: rgba(255, 255, 255, 0.72);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 36px));
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .main-nav {
    display: none;
  }

  .hero,
  .quote-shell,
  .safety {
    grid-template-columns: 1fr;
  }

  .shipping-visual {
    min-height: 420px;
  }

  .label-sheet {
    left: 0;
    right: auto;
  }

  .ops-grid,
  .settings-grid,
  .pricing-grid,
  .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .request-card {
    grid-template-columns: 1fr;
  }

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

  .card-actions select,
  .card-actions input,
  .card-actions textarea {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 10px 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    display: none;
  }

  .header-action {
    min-height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }

  .hero {
    min-height: auto;
    gap: 22px;
    padding: 30px 14px 34px;
  }

  h1 {
    margin-bottom: 14px;
    font-size: 40px;
    line-height: 1;
  }

  h2 {
    font-size: 28px;
    line-height: 1.08;
  }

  .lede {
    font-size: 16px;
  }

  .hero-actions,
  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .button,
  .result-actions .button {
    width: 100%;
  }

  .quote-shell,
  .operations,
  .tracking,
  .admin-panel,
  .safety {
    padding: 36px 14px;
  }

  .trust-row,
  .quote-summary,
  .ops-grid,
  .settings-grid,
  .metric-row,
  .breakdown-list,
  .proposal-grid,
  fieldset,
  .route-grid {
    grid-template-columns: 1fr;
  }

  .shipping-visual {
    min-height: 0;
  }

  .label-sheet {
    position: relative;
    inset: auto;
    transform: none;
    min-height: 0;
    padding: 18px;
  }

  .label-top {
    display: grid;
  }

  .barcode {
    height: 58px;
    gap: 4px;
    margin: 18px 0;
  }

  .package-stamp {
    margin-top: 14px;
  }

  .status-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 14px;
  }

  .tracking-form,
  .admin-header,
  .admin-lock,
  .pin-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-header {
    align-items: start;
  }

  .admin-actions,
  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  fieldset {
    padding: 14px;
  }

  .request-card {
    padding: 14px;
  }

  .proposal-topline {
    display: grid;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}
