:root {
  color-scheme: light;
  --ink: #132838;
  --ink-soft: #4d6574;
  --navy: #10293b;
  --navy-deep: #091d2b;
  --teal: #0c9e83;
  --teal-bright: #3bd6b2;
  --teal-pale: #dff8f1;
  --paper: #ffffff;
  --canvas: #eef3f5;
  --line: #d7e1e5;
  --line-dark: #bdd0d6;
  --amber: #d58a22;
  --amber-pale: #fff4df;
  --red: #c64f4f;
  --red-pale: #fff0ef;
  --blue-pale: #eaf4fb;
  --shadow: 0 24px 70px rgba(8, 30, 44, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
svg { display: block; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  padding: 10px 14px;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

.app-shell {
  min-height: 100vh;
}

.top-brand {
  position: relative;
  display: flex;
  min-height: 520px;
  align-items: center;
  overflow: hidden;
  padding: 32px clamp(24px, 5vw, 72px) 36px;
  background:
    radial-gradient(circle at 115% 10%, rgba(59, 214, 178, 0.22), transparent 32%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
}

.top-brand-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.top-brand::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 29, 43, .98) 0%, rgba(9, 29, 43, .92) 36%, rgba(9, 29, 43, .64) 57%, rgba(9, 29, 43, .16) 100%);
  content: "";
}

.top-brand-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.top-brand::after {
  position: absolute;
  z-index: 1;
  right: -100px;
  bottom: -65px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255, 255, 255, 0.025), 0 0 0 76px rgba(255, 255, 255, 0.018);
  content: "";
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: var(--teal-bright);
  color: var(--navy-deep);
}

.brand-mark svg { width: 30px; height: 30px; }
.brand-mark path { fill: none; stroke: currentColor; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark.small { width: 42px; height: 42px; border-radius: 13px; }
.brand-mark.small svg { width: 26px; height: 26px; }

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}
.eyebrow-light { color: #83ead2; }
.brand-name { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-name.dark { color: var(--navy); }

.rail-message { position: relative; z-index: 1; margin: 34px 0 28px; }
.rail-kicker { margin: 0 0 8px; color: #8debd5; font-weight: 750; }
.rail-message h1 { max-width: 650px; margin: 0 0 16px; font-size: clamp(2.45rem, 5vw, 4.6rem); line-height: 0.98; letter-spacing: -0.055em; }
.rail-message > p:last-child { max-width: 610px; margin: 0; color: #d9e4e7; line-height: 1.65; }

.rail-steps { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; max-width: 650px; margin: 0 0 24px; padding: 0; list-style: none; }
.rail-steps li { display: flex; align-items: center; gap: 12px; color: #78909c; transition: color 180ms ease; }
.rail-steps li.active { color: #fff; }
.rail-steps span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; font-size: .68rem; font-weight: 800; }
.rail-steps li.active span { border-color: var(--teal-bright); background: var(--teal-bright); color: var(--navy); }
.rail-steps b { font-size: .9rem; }

.privacy-note { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 10px; color: #9db1ba; font-size: .75rem; line-height: 1.45; }
.privacy-note svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: #82dfca; stroke-width: 1.8; }
.privacy-note p { margin: 0; }
.privacy-note strong { color: #dce8eb; }

.workspace { width: 100%; max-width: 1180px; margin: 0 auto; padding: 52px clamp(24px, 5vw, 72px) 80px; }
.form-view { max-width: 920px; margin: 0 auto; }
.workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.workspace-heading h2 { margin: 0; color: var(--navy); font-size: clamp(2rem, 3.8vw, 3.35rem); line-height: 1.03; letter-spacing: -0.05em; }
.lead { margin: 12px 0 0; color: var(--ink-soft); font-size: 1.05rem; }
.scope-chip { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 9px 13px; color: var(--ink-soft); font-size: .78rem; font-weight: 700; box-shadow: 0 7px 24px rgba(12, 44, 58, .05); }
.scope-chip span { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-pale); }

#intake-form { display: grid; gap: 18px; }
.form-section { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255,255,255,.9); padding: 28px; box-shadow: 0 12px 38px rgba(8, 34, 48, .055); }
.safety-section { border-color: #efd49f; }
.section-number { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 850; letter-spacing: .08em; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-heading h3 { margin: 2px 0 4px; color: var(--navy); font-size: 1.28rem; line-height: 1.25; }
.section-heading p { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.section-tag { flex: 0 0 auto; border-radius: 999px; background: var(--blue-pale); padding: 6px 9px; color: #337399; font-size: .72rem; font-weight: 800; }
.section-tag.safety { background: var(--amber-pale); color: #94580a; }

.field-grid { display: grid; gap: 14px; }
.five-fields { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span, .choice-group legend { color: #2b4655; font-size: .84rem; font-weight: 750; }
.field em, .choice-group legend em { margin-left: 5px; color: var(--teal); font-size: .66rem; font-style: normal; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.choice-group legend small { margin-left: 5px; color: #778b95; font-size: .76rem; font-weight: 550; }

input, select, textarea { width: 100%; border: 1px solid var(--line-dark); border-radius: var(--radius-sm); outline: none; background: #fff; color: var(--ink); transition: border-color 150ms ease, box-shadow 150ms ease; }
input, select { min-height: 48px; padding: 10px 12px; }
textarea { min-height: 98px; resize: vertical; padding: 13px 14px; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #9aabb3; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(12, 158, 131, .12); }
.invalid { border-color: var(--red) !important; box-shadow: 0 0 0 4px rgba(198, 79, 79, .1) !important; }

.input-with-unit { position: relative; }
.input-with-unit input { padding-right: 48px; }
.input-with-unit small { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: #718892; font-size: .73rem; font-weight: 750; pointer-events: none; }
.field-note { margin: 13px 0 0; color: #758993; font-size: .78rem; }

.choice-group { margin: 0; border: 0; padding: 0; }
.choice-group + .choice-group { margin-top: 25px; padding-top: 23px; border-top: 1px solid var(--line); }
.choice-group legend { margin-bottom: 11px; padding: 0; }
.chip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.chip-grid.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chip-grid.three-column { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check-chip { position: relative; min-width: 0; cursor: pointer; }
.check-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.check-chip span { display: flex; min-height: 46px; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 9px 12px; color: #45606d; font-size: .8rem; font-weight: 700; transition: all 150ms ease; }
.check-chip input:checked + span { border-color: var(--teal); background: var(--teal-pale); color: #086c5a; box-shadow: inset 0 0 0 1px var(--teal); }
.check-chip input:focus-visible + span { outline: 3px solid rgba(12, 158, 131, .25); outline-offset: 2px; }
.check-chip.wide { grid-column: 1 / -1; }
.conditional-field { margin-top: 12px; max-width: 430px; }
.carb-preference-group { margin: 20px 0; border: 1px solid var(--line); border-radius: 13px; background: #f8fbfc; padding: 16px; }
.carb-preference-group.invalid { border-color: var(--red) !important; box-shadow: 0 0 0 4px rgba(198, 79, 79, .1) !important; }
.textarea-field + .textarea-field { margin-top: 16px; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }

.form-error { border: 1px solid #efb7b2; border-radius: var(--radius-sm); background: var(--red-pale); padding: 13px 15px; color: #8f302d; font-size: .88rem; font-weight: 650; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 8px 0 70px; }
.expectation { display: grid; gap: 2px; }
.expectation span { color: #7e919a; font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.expectation strong { color: #385461; font-size: .82rem; }
.primary-button, .secondary-button, .text-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; font-weight: 800; transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease; }
.primary-button { min-height: 54px; border-radius: 14px; background: var(--teal); padding: 0 21px; color: #fff; box-shadow: 0 12px 24px rgba(12, 158, 131, .22); }
.primary-button:hover { transform: translateY(-1px); background: #078d75; box-shadow: 0 16px 28px rgba(12, 158, 131, .27); }
.primary-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

.result-view { max-width: 1000px; margin: 0 auto; }
.result-toolbar { position: sticky; top: 14px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; border: 1px solid rgba(190, 208, 214, .9); border-radius: 15px; background: rgba(255,255,255,.91); padding: 10px 12px; box-shadow: 0 12px 32px rgba(9, 31, 45, .1); backdrop-filter: blur(16px); }
.toolbar-actions { display: flex; align-items: center; gap: 9px; }
.text-button { background: transparent; padding: 9px 8px; color: #47616d; font-size: .84rem; }
.text-button:hover { color: var(--teal); }
.text-button svg, .secondary-button svg, .icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.secondary-button { min-height: 42px; border-radius: 10px; background: var(--navy); padding: 0 14px; color: #fff; font-size: .8rem; }
.secondary-button:hover { background: #173c54; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #47616d; }
.icon-button:hover { border-color: var(--teal); color: var(--teal); }
.word-count { color: #7b8d96; font-size: .72rem; font-weight: 700; }

.document-paper { min-height: 70vh; border: 1px solid var(--line); background: var(--paper); padding: clamp(34px, 6vw, 76px); box-shadow: var(--shadow); }
.document-loading { color: var(--ink-soft); text-align: center; }
.doc-cover { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: end; margin-bottom: 48px; border-bottom: 2px solid var(--navy); padding-bottom: 28px; }
.doc-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 27px; color: var(--teal); font-size: .76rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.doc-brand::before { width: 26px; height: 3px; background: var(--teal); content: ""; }
.doc-cover h1 { margin: 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.55rem, 6vw, 5.5rem); font-weight: 500; line-height: .92; letter-spacing: -.055em; }
.doc-cover p { max-width: 600px; margin: 18px 0 0; color: var(--ink-soft); font-size: 1rem; }
.doc-date { align-self: start; border-left: 1px solid var(--line); padding-left: 18px; color: #6d838e; font-size: .76rem; text-align: right; white-space: nowrap; }
.doc-date strong { display: block; margin-top: 2px; color: var(--navy); font-size: .94rem; }

.opening-note { margin-bottom: 36px; border-left: 5px solid var(--teal); background: var(--teal-pale); padding: 20px 22px; }
.opening-note p { margin: 0; }
.opening-note p + p { margin-top: 12px; }
.assumption-note { border-left-color: var(--amber); background: var(--amber-pale); }
.safety-callout { margin: 24px 0; border: 1px solid #efcd91; border-radius: 12px; background: var(--amber-pale); padding: 18px 20px; }
.safety-callout.danger { border-color: #efb5b0; background: var(--red-pale); }
.safety-callout h3 { margin: 0 0 7px; color: #704300; font-size: 1rem; }
.safety-callout.danger h3 { color: #8b302d; }
.safety-callout p { margin: 0; }

.doc-section { margin: 48px 0 0; }
.section-label { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; color: var(--teal); font-size: .74rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.section-label span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-size: .68rem; }
.doc-section h2 { margin: 0 0 17px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.75rem, 3.2vw, 2.55rem); font-weight: 500; line-height: 1.08; letter-spacing: -.025em; }
.doc-section h3 { margin: 27px 0 9px; color: var(--navy); font-size: 1.06rem; }
.doc-section p { margin: 0 0 15px; }
.doc-section ul, .doc-section ol { margin: 10px 0 18px; padding-left: 22px; }
.doc-section li { margin: 7px 0; }

.table-wrap { width: 100%; margin: 19px 0 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.doc-table th { background: var(--navy); padding: 12px 13px; color: #fff; font-size: .72rem; letter-spacing: .025em; text-align: left; vertical-align: bottom; }
.doc-table td { border-top: 1px solid var(--line); padding: 13px; vertical-align: top; }
.doc-table tbody tr:nth-child(even) td { background: #f7fafb; }
.doc-table strong { color: var(--navy); }
.doc-table ol { margin: 0; padding-left: 18px; }
.doc-table li { margin: 0 0 5px; }
.doc-table li:last-child { margin-bottom: 0; }
.doc-illustration { margin: 22px 0 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #f7fafb; }
.doc-illustration img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.doc-illustration figcaption { padding: 11px 14px; color: #5f7783; font-size: .78rem; line-height: 1.5; }
.plate-guide { display: grid; grid-template-columns: minmax(260px, .88fr) minmax(0, 1.12fr); gap: 24px; align-items: center; margin: 24px 0; border: 1px solid var(--line); border-radius: 18px; background: #f7fafb; padding: 20px; }
.plate-guide figure { margin: 0; }
.plate-guide figure img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 13px; object-fit: cover; }
.plate-guide figcaption { margin-top: 9px; color: #667d88; font-size: .74rem; line-height: 1.45; }
.plate-guide-copy h3 { margin: 4px 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: 1.42rem; font-weight: 500; line-height: 1.15; }
.plate-guide-kicker { margin: 0 !important; color: var(--teal); font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.meal-order-steps { display: grid; counter-reset: meal-order; gap: 9px; margin: 0 0 14px !important; padding: 0 !important; list-style: none; }
.meal-order-steps li { position: relative; min-height: 48px; margin: 0 !important; border: 1px solid #d9e8e5; border-radius: 11px; background: #fff; padding: 11px 12px 11px 49px; font-size: .86rem; line-height: 1.5; counter-increment: meal-order; }
.meal-order-steps li::before { position: absolute; top: 11px; left: 11px; display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; content: counter(meal-order); font-size: .72rem; font-weight: 850; }
.order-note { margin: 0 !important; border-left: 3px solid var(--amber); background: var(--amber-pale); padding: 11px 12px; color: #6f552c; font-size: .78rem; line-height: 1.5; }
.food-category { display: inline-block; border-radius: 999px; background: var(--teal-pale); padding: 4px 8px; color: #086a59; font-size: .69rem; font-weight: 850; }
.meal-carb { display: block; margin-top: 7px; color: #52707d; font-size: .78rem; line-height: 1.45; }
.menu-table th:first-child, .menu-table td:first-child { width: 76px; white-space: nowrap; }
.menu-table td { min-width: 210px; }
.pressure { display: inline-block; border-radius: 999px; padding: 4px 8px; font-size: .69rem; font-weight: 850; white-space: nowrap; }
.pressure.high { background: #ffe5df; color: #9a382f; }
.pressure.medium { background: #fff0cf; color: #895500; }
.pressure.low { background: var(--teal-pale); color: #086a59; }
.pressure.unknown { background: #edf1f3; color: #5d737e; }

.focus-statement { margin: 21px 0 !important; border: 1px solid #96dbc9; border-radius: 12px; background: var(--teal-pale); padding: 16px 18px; color: #075e50; }
.mini-plan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.mini-plan div { border-top: 3px solid var(--teal); background: #f3faf8; padding: 13px; }
.mini-plan span { color: var(--teal); font-size: .69rem; font-weight: 850; text-transform: uppercase; }
.mini-plan strong { display: block; margin-top: 5px; color: var(--navy); font-size: .87rem; }

.danger-list { display: grid; gap: 10px; margin: 16px 0; padding: 0 !important; list-style: none; }
.danger-list li { border-left: 4px solid var(--red); background: var(--red-pale); padding: 12px 14px; }
.source-note { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; color: #667d88; font-size: .78rem; }
.source-note a { color: #147b8e; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.source-note li { margin: 5px 0; }
.document-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 52px; border-top: 2px solid var(--navy); padding-top: 18px; color: #6d818b; font-size: .72rem; }

.out-of-scope { max-width: 720px; margin: 0 auto; }
.stop-mark { display: grid; width: 62px; height: 62px; margin-bottom: 28px; place-items: center; border-radius: 50%; background: var(--amber-pale); color: #a2620c; }
.stop-mark svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 2; }
.out-of-scope h1 { margin: 0 0 16px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 5vw, 3.7rem); font-weight: 500; line-height: 1; }
.next-step-card { margin-top: 28px; border: 1px solid var(--line); border-radius: 13px; background: #f6f9fa; padding: 20px; }
.next-step-card h2 { margin: 0 0 8px; font-size: 1.05rem; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: min(360px, calc(100vw - 44px)); transform: translateY(30px); border-radius: 11px; background: var(--navy); padding: 12px 15px; color: #fff; font-size: .84rem; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; box-shadow: 0 15px 38px rgba(9, 29, 43, .25); }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1120px) {
  .five-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .top-brand { min-height: 610px; padding: 26px 18px 30px; }
  .top-brand-art { object-position: 68% center; opacity: .68; }
  .top-brand::before { background: linear-gradient(180deg, rgba(9, 29, 43, .95) 0%, rgba(9, 29, 43, .88) 58%, rgba(9, 29, 43, .76) 100%); }
  .rail-message { margin: 28px 0 24px; }
  .rail-message h1 { font-size: clamp(2.35rem, 11vw, 3.6rem); }
  .rail-steps { grid-template-columns: 1fr; gap: 9px; }
  .workspace { padding: 24px 18px 60px; }
  .workspace-heading { align-items: flex-start; flex-direction: column; }
  .scope-chip { align-self: flex-start; }
  .form-section { grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 22px 18px; }
  .section-number { width: 42px; height: 42px; border-radius: 13px; }
  .form-actions { padding-left: 0; }
  .result-toolbar { top: 8px; }
  .word-count { display: none; }
  .document-paper { padding: 34px 24px; }
  .doc-cover { grid-template-columns: 1fr; }
  .doc-date { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; text-align: left; }
  .plate-guide { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .workspace-heading h2 { font-size: 2.35rem; }
  .form-section { display: block; }
  .section-number { margin-bottom: 15px; }
  .section-heading { margin-bottom: 19px; }
  .section-tag { display: none; }
  .five-fields, .two-up, .chip-grid, .chip-grid.two-column, .chip-grid.three-column { grid-template-columns: 1fr 1fr; }
  .field-grid .field:last-child { grid-column: 1 / -1; }
  .check-chip.wide { grid-column: 1 / -1; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .primary-button { width: 100%; }
  .result-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { justify-content: flex-end; }
  .text-button { align-self: flex-start; }
  .secondary-button { flex: 1; }
  .mini-plan { grid-template-columns: 1fr; }
  .document-footer { flex-direction: column; }
}

@media (max-width: 430px) {
  .five-fields, .two-up, .chip-grid, .chip-grid.two-column, .chip-grid.three-column { grid-template-columns: 1fr; }
  .field-grid .field:last-child, .check-chip.wide { grid-column: auto; }
  .document-paper { padding: 28px 18px; }
  .doc-table { min-width: 620px; }
  .menu-table { min-width: 920px; }
  .secondary-button { font-size: .74rem; padding-inline: 10px; }
}

@media print {
  body { background: #fff; }
  .skip-link, .top-brand, .result-toolbar, .toast { display: none !important; }
  .app-shell, .workspace { display: block; max-width: none; padding: 0; }
  .result-view { max-width: none; }
  .document-paper { border: 0; box-shadow: none; padding: 0; }
  .table-wrap { break-inside: avoid; }
  .menu-table-wrap { break-inside: auto; }
  .menu-table tr { break-inside: avoid; }
  .doc-illustration, .plate-guide { break-inside: avoid; }
  .table-wrap { overflow: visible; }
  a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
