:root {
  --ink: #102129;
  --ink-soft: #52646b;
  --navy: #0b2530;
  --navy-2: #123844;
  --cream: #f4f1e9;
  --paper: #fffefa;
  --white: #ffffff;
  --gold: #bca264;
  --gold-soft: #efe1bd;
  --sage: #9ac7b7;
  --blue: #8eb6c8;
  --line: #dbe2e2;
  --danger: #a54242;
  --danger-bg: #fff1ef;
  --success: #1f7560;
  --shadow: 0 24px 70px rgba(11, 37, 48, .12);
  --radius: 24px;
  --radius-sm: 14px;
  --container: 1180px;
  --ui-font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif;
  line-height: 1.8;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font-family: var(--ui-font); }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }

.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 9999; left: 16px; top: -80px; padding: 10px 16px; background: white; color: var(--ink); border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { top: 16px; }
.hidden { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 254, 250, .88);
  border-bottom: 1px solid rgba(16, 33, 41, .08);
  backdrop-filter: blur(18px);
}
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; color: var(--navy); border: 1px solid rgba(11,37,48,.18); border-radius: 50%; font-weight: 700; }
.brand-mark svg { width: 24px; height: 24px; }
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 21px; letter-spacing: .03em; }
.brand small { margin-top: 4px; color: var(--ink-soft); font-size: 10px; letter-spacing: .12em; }
.global-nav { display: flex; align-items: center; gap: 26px; font-family: var(--ui-font); font-size: 13px; font-weight: 700; }
.global-nav a { position: relative; padding: 8px 0; }
.global-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px; background: var(--gold); transition: right .25s ease; }
.global-nav a:hover::after { right: 0; }
.menu-button { display: none; width: 44px; height: 44px; padding: 10px; background: transparent; border: 0; }
.menu-button span:not(.sr-only) { display: block; height: 1px; background: var(--ink); margin: 6px 0; }

.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border: 1px solid transparent; border-radius: 999px; font-family: var(--ui-font); font-weight: 800; font-size: 14px; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--gold); color: #182023; box-shadow: 0 12px 30px rgba(217,183,111,.22); }
.button-primary:hover { background: #e4c67f; }
.button-outline { background: transparent; color: var(--ink); border-color: rgba(16,33,41,.22); }
.button-outline:hover { border-color: var(--ink); }
.button-ghost { background: transparent; border-color: rgba(255,255,255,.3); color: white; }
.button-ghost:hover { border-color: white; }
.button-dark { background: var(--navy); color: white; }
.button-small { min-height: 40px; padding: 8px 16px; font-size: 12px; }
.full-width { width: 100%; }
.text-button { border: 0; background: transparent; color: var(--navy); font-family: var(--ui-font); font-weight: 800; cursor: pointer; }

.section-dark { color: white; background: var(--navy); }
.eyebrow { margin: 0 0 18px; color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: .24em; }
.eyebrow.dark { color: #8b6d31; }
.section-heading { max-width: 720px; margin-bottom: 54px; }
.section-heading.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-heading.light { color: white; }
.section-heading h2, .benefit-grid h2, .check-intro h2, .cta-card h2 { margin: 0 0 18px; font-family: Georgia, "Yu Mincho", serif; font-weight: 500; font-size: clamp(34px, 4vw, 58px); line-height: 1.28; letter-spacing: -.02em; }
.section-heading p, .benefit-grid > div > p, .check-intro > p { color: var(--ink-soft); font-size: 16px; }
.section-heading.light p, .benefit-grid > div > p { color: rgba(255,255,255,.67); }

.hero { min-height: 710px; position: relative; overflow: hidden; display: flex; align-items: center; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to right, black, transparent 78%); }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .7; }
.hero-orb-one { width: 520px; height: 520px; right: -170px; top: -180px; background: radial-gradient(circle, rgba(154,199,183,.2), transparent 68%); }
.hero-orb-two { width: 430px; height: 430px; left: 35%; bottom: -290px; background: radial-gradient(circle, rgba(217,183,111,.16), transparent 68%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 70px; padding: 104px 0 94px; }
.hero h1 { margin: 0 0 26px; font-family: Georgia, "Yu Mincho", serif; font-weight: 500; font-size: clamp(50px, 6vw, 86px); line-height: 1.08; letter-spacing: -.035em; }
.hero h1 span { color: var(--gold); }
.hero-lead { max-width: 680px; color: rgba(255,255,255,.75); font-size: 17px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero-note { margin: 16px 0 0; color: rgba(255,255,255,.45); font-size: 12px; }
.hero-dashboard { position: relative; padding: 26px; background: rgba(255,255,255,.96); color: var(--ink); border-radius: 30px; box-shadow: 0 40px 90px rgba(0,0,0,.25); transform: rotate(1.5deg); }
.hero-dashboard::before { content: ""; position: absolute; inset: -10px; border: 1px solid rgba(255,255,255,.18); border-radius: 36px; }
.dashboard-topline, .dashboard-footer { display: flex; justify-content: space-between; align-items: center; }
.dashboard-topline { padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 800; }
.status-pill { padding: 5px 10px; border-radius: 999px; color: var(--success); background: #edf8f4; font-size: 10px; }
.dashboard-score { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 28px 0; }
.dashboard-label { display: block; color: var(--ink-soft); font-size: 12px; }
.dashboard-score strong { font-family: Georgia, serif; font-size: 60px; line-height: 1; }
.dashboard-score small { font-family: inherit; font-size: 13px; margin-left: 5px; }
.mini-ring { width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--gold) 0 72%, #edf0ef 72% 100%); }
.mini-ring::before { content: ""; position: absolute; width: 58px; height: 58px; background: white; border-radius: 50%; }
.mini-ring span { position: relative; z-index: 1; font-size: 12px; font-weight: 800; }
.dashboard-list { display: grid; gap: 10px; }
.dashboard-list > div { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 12px; background: #f5f6f3; font-size: 12px; }
.dashboard-list strong { font-size: 11px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-green { background: var(--sage); }.dot-gold { background: var(--gold); }.dot-blue { background: var(--blue); }
.dashboard-footer { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 800; }
.dashboard-footer button { border: 0; background: transparent; color: #8b6d31; font-weight: 800; cursor: pointer; }

.social-proof { padding: 110px 0 90px; background: var(--cream); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-card { min-height: 220px; padding: 34px; background: rgba(255,255,255,.76); border: 1px solid rgba(16,33,41,.08); border-radius: var(--radius); }
.stat-card strong { display: block; margin-bottom: 22px; font-family: Georgia, "Yu Mincho", serif; font-size: 30px; font-weight: 500; line-height: 1.2; }
.stat-card strong span { display: block; color: #8b6d31; font-size: clamp(34px,4vw,50px); white-space: nowrap; }
.stat-card strong small { display: block; margin-top: 10px; color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 500; }
.stat-card p { margin: 0; color: var(--ink-soft); }
.source-note { margin: 24px 0 0; color: #7b8587; font-size: 11px; text-align: center; }
.source-note a { color: #466b78; text-decoration: underline; text-underline-offset: 3px; }

.actions-section { padding: 120px 0; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.action-card { min-height: 320px; position: relative; display: flex; flex-direction: column; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: white; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.access-badge { align-self: flex-start; display: inline-flex; margin-bottom: 15px; padding: 5px 9px; border-radius: 999px; color: #286552; background: #edf7f2; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.access-badge.member { color: #745818; background: #f5edda; }
.member-action { background: #fffdf7; border-color: #dfd2af; }
.action-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); border-color: transparent; }
.action-card.featured { background: var(--navy); color: white; border-color: var(--navy); }
.card-number { position: absolute; right: 24px; top: 20px; color: rgba(16,33,41,.2); font-family: Georgia, serif; font-size: 34px; }
.featured .card-number { color: rgba(255,255,255,.2); }
.icon-wrap { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 38px; border-radius: 50%; background: var(--cream); color: #8b6d31; font-family: Georgia, serif; font-size: 20px; }
.featured .icon-wrap { background: rgba(255,255,255,.1); color: var(--gold); }
.action-card h3 { margin: 0 0 14px; font-family: Georgia, "Yu Mincho", serif; font-size: 23px; font-weight: 500; }
.action-card p { margin: 0 0 26px; color: var(--ink-soft); font-size: 14px; }
.featured p { color: rgba(255,255,255,.65); }
.text-link { margin-top: auto; font-size: 12px; font-weight: 900; letter-spacing: .04em; }
.text-link span { color: #8b6d31; margin-left: 5px; }
.featured .text-link span { color: var(--gold); }

.benefit-band { padding: 110px 0; }
.benefit-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; align-items: center; }
.benefit-columns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.benefit-columns > div { padding: 30px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); background: rgba(255,255,255,.04); }
.role-label { color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .2em; }
.benefit-columns h3 { margin: 10px 0 20px; font-family: Georgia, "Yu Mincho", serif; font-weight: 500; font-size: 22px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: rgba(255,255,255,.72); font-size: 13px; }
.check-list li { position: relative; padding-left: 22px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); }

.check-section { padding: 120px 0; background: #f7f8f5; }
.check-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 70px; align-items: start; }
.check-intro { position: sticky; top: 120px; }
.privacy-chip { display: inline-flex; margin-top: 20px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--success); font-size: 11px; background: white; }
.check-panel { overflow: hidden; border-radius: 28px; background: white; box-shadow: var(--shadow); }
.continuum-self-check .check-panel > #redflags { padding: 34px; }
.check-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: #fafaf7; }
.tab-button { padding: 18px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-soft); font-family: var(--ui-font); font-weight: 800; cursor: pointer; }
.tab-button.active { color: var(--navy); border-bottom-color: var(--gold); background: white; }
.tab-panel { display: none; padding: 34px; }
.tab-panel.active { display: block; }
.tab-panel h3 { margin: 0 0 8px; font-family: Georgia, "Yu Mincho", serif; font-size: 26px; font-weight: 500; }
.panel-copy { color: var(--ink-soft); font-size: 14px; }
.redflag-list { display: grid; gap: 10px; margin: 24px 0; }
.redflag-group { display: grid; gap: 10px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.redflag-group h4 { margin: 0 0 2px; color: var(--ink); font-size: 15px; }
.redflag-group.urgent { border-color: #e3c4bd; background: #fff9f7; }
.redflag-group.early { border-color: #dfd4b8; background: #fffdf7; }
.redflag-list label, .chip-grid label { cursor: pointer; }
.redflag-list input, .chip-grid input { position: absolute; opacity: 0; pointer-events: none; }
.redflag-list span { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; transition: .2s; }
.redflag-list input:checked + span { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.redflag-list input:focus-visible + span { outline: 3px solid #6f9993; outline-offset: 2px; }
.alert-box { margin: 18px 0; padding: 18px; border-left: 4px solid var(--danger); border-radius: 10px; background: var(--danger-bg); color: #743232; }
.alert-box p { margin: 5px 0 0; font-size: 12px; }
.questionnaire-header { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.questionnaire-header p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.progress-badge { display: inline-flex; min-width: 56px; padding: 6px 10px; justify-content: center; border-radius: 999px; background: var(--cream); font-size: 12px; font-weight: 800; }
.question-list { display: grid; gap: 22px; margin: 28px 0; }
.question-block { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.question-block:last-child { border-bottom: 0; }
.question-block legend { margin-bottom: 12px; font-weight: 800; font-size: 14px; line-height: 1.6; }
.choice-row { display: flex; flex-wrap: wrap; gap: 7px; }
.choice-row label { cursor: pointer; }
.choice-row input { position: absolute; opacity: 0; }
.choice-row span { display: inline-flex; min-height: 36px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: 11px; transition: .2s; }
.choice-row input:checked + span { color: white; background: var(--navy); border-color: var(--navy); }
.score-result { margin-top: 20px; padding: 24px; border-radius: 16px; background: var(--cream); }
.score-result strong.score-number { display: block; font-family: Georgia, serif; font-size: 46px; line-height: 1; }
.score-result h4 { margin: 12px 0 6px; font-size: 18px; }
.score-result p { margin: 0 0 16px; color: var(--ink-soft); font-size: 13px; }

.diary-section { padding: 120px 0; background: var(--cream); }
.diary-app { overflow: hidden; border: 1px solid rgba(16,33,41,.1); border-radius: 28px; background: white; box-shadow: 0 22px 60px rgba(11,37,48,.08); }
.diary-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 24px; border-bottom: 1px solid var(--line); background: #fafaf7; }
.diary-tabs { display: flex; gap: 7px; }
.diary-tab { min-width: 78px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink-soft); font-family: var(--ui-font); font-weight: 800; cursor: pointer; }
.diary-tab.active { border-color: var(--navy); background: var(--navy); color: white; }
.diary-privacy { color: var(--success); font-size: 11px; }
.diary-day-panel { padding: 28px; }
.diary-settings { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 14px; align-items: end; margin-bottom: 24px; }
.diary-settings .button { white-space: nowrap; }
.diary-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.diary-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.diary-table th { padding: 11px 10px; background: #f7f8f5; color: var(--ink-soft); font-size: 10px; text-align: left; }
.diary-table td { padding: 9px 8px; border-top: 1px solid var(--line); }
.diary-table input, .diary-table select { width: 100%; min-height: 39px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.diary-table input[type="checkbox"] { width: 20px; min-height: 20px; accent-color: var(--navy); }
.diary-remove { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f3f0e9; color: var(--ink-soft); cursor: pointer; }
.diary-empty { padding: 28px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.diary-day-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.diary-metric { padding: 15px; border-radius: 14px; background: #f7f8f5; }
.diary-metric span { display: block; color: var(--ink-soft); font-size: 10px; }
.diary-metric strong { display: block; margin-top: 5px; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.diary-overall { display: grid; grid-template-columns: .7fr 1.3fr; gap: 26px; align-items: center; padding: 26px 28px; background: var(--navy); color: white; }
.diary-overall > div > span { display: block; color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.diary-overall > div > strong { display: block; margin-top: 7px; font-family: Georgia, "Yu Mincho", serif; font-size: 24px; font-weight: 500; }
.diary-overall dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0; }
.diary-overall dl div { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.15); }
.diary-overall dt { color: rgba(255,255,255,.58); font-size: 9px; }
.diary-overall dd { margin: 5px 0 0; font-size: 16px; font-weight: 800; }
.diary-note { margin: 0; padding: 14px 28px 18px; color: #6f7a7d; font-size: 10px; background: var(--navy); }
.diary-member-card { max-width: 960px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: center; margin: 0 auto; padding: 42px; border: 1px solid rgba(16,33,41,.1); border-radius: 28px; background: white; box-shadow: 0 22px 60px rgba(11,37,48,.08); }
.diary-member-visual { min-height: 260px; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; padding: 30px; border-radius: 22px; color: white; background: var(--navy); }
.diary-member-visual span { color: var(--gold); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.diary-member-visual strong { display: block; font-family: Georgia, serif; font-size: 46px; font-weight: 500; }
.diary-member-visual i { color: rgba(255,255,255,.28); font-style: normal; }
.member-feature-list { min-height: 260px; display: grid; align-content: center; gap: 1px; padding: 30px; border-radius: 22px; color: white; background: var(--navy); }
.member-feature-list > div { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 14px; padding: 17px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.member-feature-list > div:last-child { border-bottom: 0; }
.member-feature-list span { color: var(--gold); font-family: Georgia, serif; font-size: 19px; }
.member-feature-list strong { font-family: Georgia, "Yu Mincho", serif; font-size: 18px; font-weight: 500; }
.diary-member-card h3 { margin: 0 0 16px; font-family: Georgia, "Yu Mincho", serif; font-size: 28px; font-weight: 500; }
.diary-member-card ul { margin: 0 0 24px; padding-left: 1.2em; color: var(--ink-soft); font-size: 13px; }
.diary-member-card li + li { margin-top: 7px; }
.diary-member-card p { margin: 14px 0 0; color: var(--ink-soft); font-size: 10px; }

.pdf-section { padding: 120px 0; }
.diary-link-status { max-width: 920px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; margin: -18px auto 30px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.diary-link-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #8b6d31; background: #f4f1e9; font-weight: 900; }
.diary-link-status strong, .diary-link-status p { display: block; margin: 0; }
.diary-link-status strong { font-size: 12px; }
.diary-link-status p { margin-top: 2px; color: var(--ink-soft); font-size: 10px; }
.diary-link-status a { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.diary-link-status[data-state="connected"] { border-color: #b9d9ca; background: #f2faf6; }
.diary-link-status[data-state="connected"] .diary-link-icon { color: white; background: #287358; }
.diary-link-status[data-state="anonymous"] { background: #f7f5ef; }
.diary-link-status[data-state="error"] .diary-link-icon { color: #8a4038; }
.builder-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: start; }
.builder-form { padding: 34px; border: 1px solid var(--line); border-radius: 28px; background: white; }
.builder-progress { display: flex; align-items: center; margin-bottom: 36px; }
.builder-progress span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-soft); font-size: 12px; font-weight: 800; background: white; }
.builder-progress span.active, .builder-progress span.done { color: white; background: var(--navy); border-color: var(--navy); }
.builder-progress i { flex: 1; height: 1px; background: var(--line); }
.builder-step { display: none; }
.builder-step.active { display: block; }
.step-kicker { display: block; margin-bottom: 8px; color: #8b6d31; font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.builder-step h3 { margin: 0 0 8px; font-family: Georgia, "Yu Mincho", serif; font-size: 28px; font-weight: 500; }
.builder-step > p { margin-top: 0; color: var(--ink-soft); font-size: 13px; }
.builder-controls { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; }
.builder-controls .button { min-width: 130px; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0 28px; }
.chip-grid span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: 12px; transition: .2s; }
.chip-grid input:checked + span { color: white; background: var(--navy); border-color: var(--navy); }
.form-grid { display: grid; gap: 16px; }
.form-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.form-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.form-grid.compact { gap: 10px; }
.intake-basics { margin: 22px 0 28px; }
.mini-heading { margin: 24px 0 0; font-size: 14px; letter-spacing: .02em; }
.history-group + .history-group { margin-top: 18px; }
.compact-chips { margin: 12px 0 8px; gap: 7px; }
.compact-chips span { min-height: 35px; padding: 6px 11px; font-size: 11px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 12px; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; color: var(--ink); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,183,111,.16); }
.field textarea { resize: vertical; }
.medication-section { margin-top: 28px; }
.past-medications { margin-top: 38px; padding-top: 30px; border-top: 1px solid var(--line); }
.subheading-row { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.subheading-row h4 { margin: 0; font-size: 17px; }
.subheading-row p { margin: 3px 0 0; color: var(--ink-soft); font-size: 11px; }
.medication-list { display: grid; gap: 12px; margin-top: 16px; }
.medication-card { padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fafaf7; }
.med-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 12px; }
.remove-med { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #ecefea; color: var(--ink-soft); cursor: pointer; }
.pdf-preview { position: sticky; top: 105px; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: #e9ece8; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; color: white; background: var(--navy); font-size: 12px; font-weight: 800; }
.preview-toolbar button { border: 0; padding: 7px 12px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 800; cursor: pointer; }
.preview-toolbar button:disabled { opacity: .45; cursor: not-allowed; }
.preview-paper { min-height: 660px; margin: 22px; padding: 34px; background: white; box-shadow: 0 15px 40px rgba(11,37,48,.13); }
.empty-preview { height: 590px; display: flex; flex-direction: column; justify-content: center; text-align: center; color: #829095; }
.empty-preview span { color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: .2em; }
.empty-preview h3 { margin: 14px 0; color: var(--ink); font-family: Georgia, "Yu Mincho", serif; font-size: 28px; font-weight: 500; }
.empty-preview p { max-width: 320px; margin: 0 auto; font-size: 12px; }
.pdf-document { color: #17252c; font-size: 9.5px; line-height: 1.55; }
.pdf-doc-header { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 10px; border-bottom: 2px solid #17323c; }
.pdf-doc-header h2 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: 20px; }
.pdf-doc-header span { color: #6b7a80; font-size: 8px; }
.pdf-section-block { margin-top: 13px; }
.pdf-section-block h3 { margin: 0 0 6px; padding-bottom: 3px; border-bottom: 1px solid #d9dfdf; font-size: 10px; letter-spacing: .05em; }
.pdf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; }
.pdf-item.wide { grid-column: 1 / -1; }
.pdf-patient-strip { display: grid; grid-template-columns: .55fr .7fr 1.15fr 1.6fr; gap: 1px; margin: 10px 0; overflow: hidden; border: 1px solid #cfd7d8; border-radius: 6px; background: #cfd7d8; }
.pdf-patient-strip div { display: flex; flex-direction: column; padding: 6px 7px; background: #f7f8f6; }
.pdf-patient-strip b { color: #657278; font-size: 7.5px; text-transform: uppercase; }
.pdf-patient-strip span { font-weight: 700; }
.pdf-alert-text { color: #a33f34; }
.pdf-item { display: grid; grid-template-columns: 80px 1fr; gap: 7px; }
.pdf-item b { color: #607077; font-weight: 600; }
.pdf-table { width: 100%; border-collapse: collapse; font-size: 8.5px; }
.pdf-table th, .pdf-table td { padding: 5px; border: 1px solid #d9dfdf; vertical-align: top; }
.pdf-table th { background: #f2f4f1; text-align: left; }
.pdf-question-list { margin: 0; padding-left: 18px; }
.pdf-disclaimer { margin-top: 12px; padding: 7px; background: #f5f5f1; color: #69787e; font-size: 7.5px; }

.knowledge-section { padding: 76px 0; background: var(--cream); }
.knowledge-section .section-heading { margin-bottom: 0; }
.knowledge-gateways { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 1180px; margin: 30px auto 0; }
.knowledge-gateway { min-height: 360px; display: flex; flex-direction: column; padding: 32px; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: white; box-shadow: 0 22px 60px rgba(11,37,48,.06); }
.knowledge-gateway > div { display: flex; align-items: center; justify-content: space-between; }
.knowledge-gateway > div span { color: #8b6d31; font-size: 9px; font-weight: 900; letter-spacing: .17em; }
.knowledge-gateway > div b { color: #d9d5c9; font-family: Georgia, serif; font-size: 36px; font-weight: 400; }
.knowledge-gateway h3 { margin: 30px 0 12px; font-family: Georgia, "Yu Mincho", serif; font-size: 31px; font-weight: 500; }
.knowledge-gateway p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.knowledge-gateway ul { display: flex; flex-wrap: wrap; gap: 7px; margin: 22px 0; padding: 0; list-style: none; }
.knowledge-gateway li a { display: block; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: #faf9f5; font-size: 9px; }
.knowledge-gateway-link { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 900; }
.knowledge-gateway-link i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--ink); font-style: normal; }
.disease-gateway { color: white; border-color: var(--ink); background: var(--ink); }
.disease-gateway > div span { color: var(--gold); }
.disease-gateway > div b { color: rgba(255,255,255,.18); }
.disease-gateway p { color: rgba(255,255,255,.65); }
.disease-gateway li a { color: rgba(255,255,255,.72); border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.05); }
.disease-gateway .knowledge-gateway-link { color: white; border-color: rgba(255,255,255,.14); }
.disease-gateway .knowledge-gateway-link i { color: var(--ink); background: var(--gold); }
.article-gateway { color: white; border-color: #183943; background: #183943; }
.article-gateway p { color: rgba(255,255,255,.62); }
.article-gateway > div b { color: rgba(255,255,255,.18); }
.article-gateway .knowledge-gateway-link { color: white; border-color: rgba(255,255,255,.14); }
.article-gateway .knowledge-gateway-link i { color: var(--ink); background: var(--gold); }
.selfcare-gateway { border-color: #c8d9d2; background: #eef5f1; }
.selfcare-gateway > div span { color: #346b5d; }
.selfcare-gateway .knowledge-gateway-link i { background: #346b5d; }
.printables-promo { overflow: hidden; padding: 105px 0; background: #ebe8e0; }
.printables-promo-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; align-items: center; }
.printables-promo-copy h2 { margin: 0; font-family: Georgia,"Yu Mincho",serif; font-size: clamp(36px,4.6vw,54px); font-weight: 500; line-height: 1.35; letter-spacing: -.03em; }
.printables-promo-copy > p:not(.eyebrow) { max-width: 560px; margin: 22px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 2; }
.printables-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 23px 0; }
.printables-tags span { padding: 6px 10px; border: 1px solid rgba(11,37,48,.13); border-radius: 999px; color: #53646a; background: rgba(255,255,255,.48); font-size: 9px; font-weight: 800; }
.printables-stack { position: relative; min-height: 470px; }
.printables-stack img { position: absolute; width: 48%; max-height: 410px; object-fit: contain; border: 1px solid rgba(11,37,48,.1); background: white; box-shadow: 0 24px 45px rgba(11,37,48,.14); }
.printables-stack img:nth-child(1) { left: 2%; top: 45px; transform: rotate(-6deg); }
.printables-stack img:nth-child(2) { left: 27%; top: 5px; z-index: 2; }
.printables-stack img:nth-child(3) { right: 0; top: 55px; transform: rotate(6deg); }

.programs-section { padding: 120px 0; }
.program-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.program-card { position: relative; min-height: 410px; display: flex; flex-direction: column; padding: 30px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); background: rgba(255,255,255,.045); }
.program-card.featured { background: var(--gold); color: var(--ink); border-color: var(--gold); transform: translateY(-12px); }
.program-tag { font-size: 9px; font-weight: 900; letter-spacing: .18em; color: var(--gold); }
.program-card.featured .program-tag { color: #6d531d; }
.program-card h3 { margin: 22px 0 12px; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.program-card p { color: rgba(255,255,255,.63); font-size: 13px; }
.program-card.featured p { color: rgba(16,33,41,.72); }
.program-card ul { padding-left: 18px; color: rgba(255,255,255,.75); font-size: 12px; }
.program-card.featured ul { color: rgba(16,33,41,.75); }
.program-card a { margin-top: auto; font-weight: 900; font-size: 12px; }
.program-card.prostate-program { border-color: rgba(217,183,111,.54); }
.program-card.prostate-program h3 { color: var(--gold); }

.pricing-section { padding: 120px 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.price-card { position: relative; min-height: 610px; display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: white; }
.price-card.popular { border: 2px solid var(--gold); box-shadow: var(--shadow); transform: translateY(-10px); }
.price-card.concierge { color: white; background: var(--navy); border-color: var(--navy); }
.popular-label { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 5px 14px; border-radius: 999px; background: var(--gold); font-size: 10px; font-weight: 900; white-space: nowrap; }
.price-header span { color: #8b6d31; font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.concierge .price-header span { color: var(--gold); }
.price-header h3 { margin: 8px 0 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.price { display: flex; align-items: baseline; gap: 4px; margin: 22px 0 7px; }
.price strong { font-family: Georgia, serif; font-size: 38px; font-weight: 500; }
.price span { color: var(--ink-soft); font-size: 11px; }
.concierge .price span { color: rgba(255,255,255,.55); }
.price-copy { min-height: 44px; margin: 0 0 22px; color: var(--ink-soft); font-size: 12px; }
.concierge .price-copy { color: rgba(255,255,255,.65); }
.feature-list { list-style: none; display: grid; gap: 12px; margin: 0 0 26px; padding: 0; font-size: 12px; }
.feature-list li { position: relative; padding-left: 21px; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: #8b6d31; }
.concierge .feature-list li::before { color: var(--gold); }
.price-card > .button { margin-top: auto; }
.session-addon { margin: 4px 0 20px; padding: 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.06); }
.session-addon span, .session-addon strong, .session-addon b { display: block; }
.session-addon span { color: var(--gold); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.session-addon strong { margin: 5px 0; font-size: 11px; }
.session-addon b { font-size: 12px; }
.pricing-note { max-width: 800px; margin: 32px auto 0; color: var(--ink-soft); text-align: center; font-size: 11px; }

.cta-section { padding: 40px 0 110px; }
.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 56px; border-radius: 30px; color: white; background: var(--navy); }
.cta-card h2 { font-size: clamp(32px, 4vw, 50px); }
.cta-card p { color: rgba(255,255,255,.64); }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; min-width: 340px; }

.site-footer { padding: 70px 0 20px; color: rgba(255,255,255,.72); background: #071b23; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr 1.3fr; gap: 50px; }
.footer-brand { color: white; }
.footer-grid > div:first-child > p { font-size: 12px; }
.footer-grid h3 { margin: 0 0 15px; color: white; font-size: 12px; }
.footer-grid a { display: block; margin: 8px 0; font-size: 11px; }
.footer-caution p { margin: 0; color: rgba(255,255,255,.5); font-size: 10px; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 50px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 9px; }

.login-dialog { width: min(460px, calc(100% - 32px)); padding: 38px; border: 0; border-radius: 22px; box-shadow: var(--shadow); }
.login-dialog::backdrop { background: rgba(7,27,35,.7); backdrop-filter: blur(5px); }
.login-dialog h2 { font-family: Georgia, "Yu Mincho", serif; font-weight: 500; }
.login-dialog p { color: var(--ink-soft); font-size: 13px; }
.dialog-close { position: absolute; right: 16px; top: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--cream); cursor: pointer; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1050px) {
  .global-nav { gap: 16px; }
  .hero-grid { grid-template-columns: 1fr 390px; gap: 36px; }
  .action-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .price-card.popular { transform: none; }
  .knowledge-gateways { grid-template-columns: repeat(2, 1fr); }
  .printables-promo-grid { gap: 42px; }
}

@media (max-width: 820px) {
  .container { width: min(100% - 28px, var(--container)); }
  .continuum-self-check .container { width: min(100% - 32px, var(--container)); }
  .menu-button { display: block; }
  .global-nav { position: fixed; inset: 76px 0 auto 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 18px 24px 28px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 24px 60px rgba(11,37,48,.12); }
  .global-nav.open { display: flex; }
  .global-nav a, .global-nav button { padding: 14px 0; }
  .global-nav .button { border-radius: 999px; padding: 9px 16px; }
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; padding: 88px 0 72px; }
  .hero-dashboard { max-width: 480px; transform: none; }
  .stat-grid, .benefit-grid, .check-grid, .builder-layout, .program-grid { grid-template-columns: 1fr; }
  .diary-settings { grid-template-columns: repeat(3, 1fr); }
  .diary-settings .button { grid-column: 1 / -1; }
  .diary-overall { grid-template-columns: 1fr; }
  .diary-member-card { grid-template-columns: 1fr; gap: 28px; }
  .benefit-grid { gap: 42px; }
  .check-intro, .pdf-preview { position: static; }
  .continuum-self-check .check-grid { gap: 28px; }
  .pdf-preview { margin-top: 10px; }
  .program-card.featured { transform: none; }
  .printables-promo-grid { grid-template-columns: 1fr; }
  .printables-stack { max-width: 620px; min-height: 420px; }
  .cta-card { align-items: flex-start; flex-direction: column; }
  .cta-actions { min-width: 0; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  body { line-height: 1.72; }
  .hero h1 { font-size: 48px; }
  .hero-lead br { display: none; }
  .hero-actions, .cta-actions { display: grid; width: 100%; }
  .hero-actions .button, .cta-actions .button { width: 100%; }
  .hero-dashboard { padding: 20px; }
  .stat-grid, .action-grid, .benefit-columns, .pricing-grid, .footer-grid { grid-template-columns: 1fr; }
  .action-card { min-height: 270px; }
  .section-heading h2, .benefit-grid h2, .check-intro h2 { font-size: 36px; }
  .social-proof, .actions-section, .benefit-band, .check-section, .pdf-section, .knowledge-section, .printables-promo, .programs-section, .pricing-section { padding: 84px 0; }
  .printables-stack { min-height: 300px; }
  .tab-panel, .builder-form { padding: 24px 18px; }
  .continuum-self-check .check-panel > #redflags { padding: 24px 18px; }
  .check-tabs { overflow-x: auto; }
  .tab-button { min-width: 105px; }
  .form-grid.two-col { grid-template-columns: 1fr; }
  .form-grid.three-col { grid-template-columns: 1fr; }
  .diary-toolbar { align-items: flex-start; flex-direction: column; }
  .diary-day-panel { padding: 18px; }
  .diary-settings { grid-template-columns: 1fr; }
  .diary-day-summary, .diary-overall dl { grid-template-columns: repeat(2, 1fr); }
  .diary-member-card { padding: 22px; }
  .diary-member-visual { min-height: 180px; padding: 20px; }
  .builder-controls { flex-wrap: wrap; }
  .builder-controls .button { flex: 1; }
  .preview-paper { min-height: 560px; margin: 12px; padding: 20px; }
  .diary-link-status { grid-template-columns: auto 1fr; margin-top: -8px; }
  .diary-link-status a { grid-column: 1 / -1; text-align: center; }
  .knowledge-section { padding: 74px 0; }
  .knowledge-gateways { grid-template-columns: 1fr; }
  .knowledge-gateway { min-height: 330px; padding: 24px; }
  .cta-card { padding: 34px 24px; }
  .footer-bottom { flex-direction: column; gap: 7px; }
}

@media print {
  body * { visibility: hidden !important; }
  #preview-paper, #preview-paper * { visibility: visible !important; }
  #preview-paper { position: absolute; left: 0; top: 0; width: 100%; min-height: auto; margin: 0; padding: 18mm; box-shadow: none; }
  .pdf-document { font-size: 10.5pt; }
  @page { size: A4; margin: 0; }
}
