:root {
  --surface: #fff7f5;
  --muted-surface: #ffe8e2;
  --petal: #f6b7af;
  --peach: #f3a58e;
  --wine: #7d2d3a;
  --wine-dark: #54202b;
  --leaf: #7b8750;
  --ink: #3b2026;
  --muted: #7e6264;
  --line: #e8c3bd;
  --accent: #b55263;
  --accent-dark: #7d2d3a;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(255, 247, 245, 0.96), rgba(255, 232, 226, 0.82)),
    var(--surface);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

.access-shell,
.protocol-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.access-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(320px, 1.08fr);
  gap: 48px;
  align-items: center;
  padding: 48px 0;
}

.access-hero {
  display: grid;
  gap: 20px;
}

.brand-mark {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #f7c9c1;
  box-shadow: 0 24px 70px rgba(125, 45, 58, 0.16);
}

.brand-mark img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.brand-row img {
  display: block;
  width: min(260px, 70vw);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 16px 44px rgba(125, 45, 58, 0.14);
}

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

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

h1 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
  color: var(--wine-dark);
}

.access-hero h1 {
  font-size: clamp(34px, 4.4vw, 56px);
}

.lead {
  max-width: 560px;
  color: var(--muted);
  font-size: 20px;
}

.panel {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 22px 60px rgba(125, 45, 58, 0.1);
}

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

.first-access-fields {
  display: grid;
  gap: 18px;
}

.first-access-fields[hidden] {
  display: none;
}

label,
legend {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.segmented label {
  display: block;
  position: relative;
}

.segmented label + label {
  border-left: 1px solid var(--line);
}

.segmented input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.segmented span {
  display: grid;
  place-items: center;
  min-height: 48px;
  background: #ffffff;
  cursor: pointer;
}

.segmented input:checked + span {
  background: var(--wine);
  color: #ffffff;
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.notice {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  background: rgba(246, 183, 175, 0.18);
  border-left: 4px solid var(--leaf);
  border-radius: 0 14px 14px 0;
  padding-left: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.primary-action {
  min-height: 54px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(181, 82, 99, 0.22);
}

.primary-action:hover {
  background: var(--accent-dark);
}

.loading-view {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 247, 245, 0.98), rgba(255, 232, 226, 0.92)),
    var(--surface);
  display: grid;
  place-items: center;
  padding: 24px;
}

.loading-view[hidden] {
  display: none;
}

.loading-box {
  width: min(720px, 100%);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 24px 70px rgba(125, 45, 58, 0.16);
}

.loading-logo {
  width: 116px;
  height: 116px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--line);
  margin-bottom: 20px;
}

.loading-box h2 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--wine-dark);
  font-size: clamp(34px, 7vw, 72px);
  line-height: 0.98;
  margin-bottom: 16px;
}

.progress-track {
  width: 100%;
  height: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 999px;
  overflow: hidden;
  margin: 28px 0 10px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 1s linear;
}

.timer {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.protocol-shell {
  padding: 42px 0 72px;
}

.protocol-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
}

.summary-grid,
.ingredients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

.summary-grid article,
.ingredients-grid article {
  min-height: 120px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px;
  background: rgba(255, 255, 255, 0.66);
}

.summary-grid span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.summary-grid strong {
  font-size: 20px;
  word-break: break-word;
}

.ingredients-band {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 48px rgba(125, 45, 58, 0.1);
}

.ingredients-band h2,
.protocol-section h2,
.care-note h2 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--wine-dark);
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1;
}

.ingredients-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 0;
}

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

.protocol-section {
  margin-top: 46px;
}

.section-heading {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.section-heading p {
  color: var(--muted);
  font-size: 18px;
}

.protocol-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.day-card {
  min-height: 270px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.day-card.featured {
  background: rgba(255, 232, 226, 0.72);
}

.day-number {
  color: var(--accent);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.day-card h3 {
  margin: 14px 0;
  color: var(--wine-dark);
  font-size: 20px;
}

.dose-list {
  margin: 0;
  padding-left: 18px;
}

.dose-list li {
  margin-bottom: 6px;
}

.care-note {
  margin-top: 46px;
  border: 1px solid var(--accent);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.68);
  padding: 28px;
}

.care-note p {
  color: var(--muted);
  max-width: 920px;
}

@media (max-width: 860px) {
  .access-shell,
  .protocol-header,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .ingredients-grid,
  .protocol-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .access-shell,
  .protocol-shell {
    width: min(100% - 20px, var(--max));
  }

  .panel,
  .ingredients-band,
  .care-note {
    padding: 18px;
  }

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