:root {
  --formatter-bg: #eef9f2;
  --formatter-bg-soft: #f6fcf8;
  --formatter-surface: rgba(255, 255, 255, .9);
  --formatter-surface-solid: #ffffff;
  --formatter-ink: #102217;
  --formatter-muted: #687b6f;
  --formatter-accent: #45a778;
  --formatter-accent-dark: #173f2e;
  --formatter-accent-soft: #dff5e8;
  --formatter-border: #cfe3d6;
  --formatter-grid: rgba(55, 139, 95, .09);
  --formatter-shadow: 0 20px 46px -30px rgba(18, 69, 43, .34);
  --formatter-card-radius: 24px;
  --formatter-control-radius: 14px;
  --formatter-font: "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

html { scroll-behavior: auto; }

body.home-page,
body.format-page,
body.templates-page {
  margin: 0;
  color: var(--formatter-ink);
  font-family: var(--formatter-font);
  background-color: var(--formatter-bg);
  background-image:
    linear-gradient(var(--formatter-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--formatter-grid) 1px, transparent 1px),
    radial-gradient(circle at 50% 12%, rgba(199, 246, 216, .86), transparent 38%);
  background-size: 68px 68px, 68px 68px, 100% 760px;
  background-position: center top;
}

body.home-page.alto-page,
body.format-page.alto-page,
body.templates-page.alto-page {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

body.home-page [data-reveal],
body.format-page [data-reveal],
body.templates-page [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

body.home-page::before,
body.home-page::after,
body.format-page::before,
body.format-page::after,
.xp-atmosphere,
.alto-kinetic-field,
.xp-motion-rail,
.home-section-dock,
.xp-orbit-field,
.site-scroll-progress { display: none !important; }

.page-shell { width: min(calc(100% - 48px), 1152px); margin-inline: auto; }

/* Header */
body.home-page .alto-nav,
body.templates-page .alto-nav {
  position: sticky;
  z-index: 30;
  top: 18px;
  width: min(calc(100% - 48px), 1152px);
  height: 65px !important;
  min-height: 65px !important;
  margin: 24px auto 0;
  border: 1px solid rgba(255, 255, 255, .68) !important;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88) !important;
  box-shadow: var(--formatter-shadow) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px);
}

body.home-page .alto-nav .nav-shell,
body.templates-page .alto-nav .nav-shell {
  width: 100% !important;
  max-width: none;
  height: 64px !important;
  padding: 0 20px;
}

.alto-brand { color: var(--formatter-ink); }
.alto-brand img { width: 34px; height: 34px; }
.alto-brand span { gap: 1px; }
.alto-brand b { font-size: 17px; letter-spacing: .18em; }
.alto-brand small { color: #638071; font-size: 8px; letter-spacing: .32em; }

body.home-page .alto-links,
body.templates-page .alto-links { height: auto !important; gap: 3px !important; margin-left: 0 !important; }

body.home-page .alto-links a,
body.templates-page .alto-links a {
  min-height: 38px;
  height: 38px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  color: #43594b;
  font-size: 14px;
  font-weight: 600;
}

body.home-page .alto-links a:hover,
body.home-page .alto-links a.active,
body.templates-page .alto-links a:hover,
body.templates-page .alto-links a.active { color: var(--formatter-ink); background: var(--formatter-accent-soft); }
.alto-nav[data-site-shell-header] .alto-links > a.active::after { display: none !important; }
.nav-tracker { display: none !important; }

.nav-actions { gap: 10px; }
body.home-page .alto-nav[data-site-shell-header] .nav-actions,
body.templates-page .alto-nav[data-site-shell-header] .nav-actions { gap: 10px !important; padding-left: 0 !important; border-left: 0 !important; }
.nav-user.nav-visitor {
  gap: 7px;
  color: #486052;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
}
.nav-user .user-avatar {
  width: 32px;
  height: 32px;
  border: 1px solid #cfe6d7;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8f8ee;
  color: #2d7954;
}

.nav-task,
.footer-start,
.landing-primary {
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--formatter-accent);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--formatter-accent-dark);
  box-shadow: 0 18px 38px -26px rgba(16, 34, 23, .58);
  color: #f7fff9;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.nav-task:hover,
.footer-start:hover,
.landing-primary:hover { background: #0f3224; transform: translateY(-1px); }
.nav-task:active,
.footer-start:active,
.landing-primary:active { transform: scale(.98); }

/* Landing page */
.landing-main { padding: 0 0 70px; }

.landing-hero {
  position: relative;
  min-height: 580px;
  padding: 116px 140px 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

.hero-kicker {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .84);
  color: #4d6958;
  font-size: 14px;
  box-shadow: 0 14px 36px -30px rgba(16, 34, 23, .42);
}

.hero-kicker span { color: var(--formatter-accent); font-size: 20px; }

.landing-hero h1 {
  max-width: 980px;
  margin: 28px auto 0;
  color: var(--formatter-ink);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.08;
}

.landing-hero h2 {
  max-width: 900px;
  margin: 25px auto 0;
  color: #173d2b;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 740;
  letter-spacing: -.045em;
  line-height: 1.12;
}

.landing-hero > p {
  max-width: 680px;
  margin: 28px auto 0;
  color: #536b5c;
  font-size: 18px;
  line-height: 1.75;
}

.landing-actions { margin-top: 34px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.landing-primary,
.landing-secondary { min-width: 128px; min-height: 52px; padding-inline: 28px; }

.landing-secondary {
  border: 1px solid rgba(141, 175, 153, .5);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .82);
  color: #355040;
  font-size: 14px;
  font-weight: 700;
}
.landing-secondary:hover { border-color: #98c6a9; background: #fff; transform: translateY(-1px); }
.landing-secondary:active { transform: scale(.98); }

.hero-chip {
  position: absolute;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 36px -28px rgba(16, 34, 23, .44);
  color: #397557;
  font-size: 12px;
  font-weight: 700;
  transform: rotate(-4deg);
}
.chip-template { top: 178px; left: 34px; background: #fff7dc; color: #8b6b26; transform: rotate(-6deg); }
.chip-preview { top: 150px; right: 35px; background: #f1eaff; color: #71549a; transform: rotate(7deg); }
.chip-format { top: 350px; left: 87px; }
.chip-export { top: 388px; right: 65px; background: #ffeaf3; color: #a64f75; transform: rotate(-6deg); }

.landing-section { scroll-margin-top: 112px; margin-top: 72px; }
.landing-section-heading { margin-bottom: 38px; text-align: center; }
.landing-section-heading h2 { margin: 0; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.045em; line-height: 1.15; }
.landing-section-heading p { max-width: 680px; margin: 14px auto 0; color: #5c7163; font-size: 17px; line-height: 1.7; }

.flow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.flow-grid article {
  min-height: 198px;
  padding: 30px 26px;
  border: 1px solid rgba(202, 224, 211, .85);
  border-radius: var(--formatter-card-radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 50px -42px rgba(16, 67, 39, .48);
}
.flow-grid article > span { color: #31865d; font-size: 14px; font-weight: 800; }
.flow-grid h3 { margin: 26px 0 0; font-size: 22px; letter-spacing: -.025em; }
.flow-grid p { margin: 14px 0 0; color: #627568; font-size: 14px; line-height: 1.85; }

.features-section { padding-top: 10px; }
.feature-stack { display: grid; gap: 18px; }
.feature-row {
  min-height: 310px;
  padding: 38px;
  border: 1px solid rgba(198, 224, 209, .9);
  border-radius: 30px;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  align-items: center;
  gap: 48px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--formatter-shadow);
}
.feature-row.reverse .feature-copy { order: 2; }
.feature-row.reverse .feature-visual { order: 1; }
.feature-copy > span { color: #3a8460; font-size: 13px; font-weight: 800; }
.feature-copy h3 { max-width: 430px; margin: 14px 0 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.04em; line-height: 1.2; }
.feature-copy p { max-width: 480px; margin: 18px 0 0; color: #617468; font-size: 16px; line-height: 1.8; }

.feature-visual {
  min-height: 220px;
  border: 1px solid #cbe5d5;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #dff7e8, #f8fffa);
  overflow: hidden;
}
.structure-visual { flex-direction: column; align-items: stretch; gap: 10px; padding: 28px 42px; }
.structure-visual b { color: #244f38; font-size: 14px; }
.structure-visual i { width: 78%; height: 7px; border-radius: 999px; background: rgba(68, 152, 102, .2); }
.structure-visual i:nth-of-type(2) { width: 91%; }
.structure-visual i:nth-of-type(3) { width: 64%; }
.compare-visual { gap: 18px; padding: 28px; }
.compare-visual div { flex: 1; min-height: 118px; padding: 22px; border-radius: 16px; display: grid; align-content: center; gap: 10px; background: rgba(255, 255, 255, .82); }
.compare-visual small { color: #6b8071; }
.compare-visual strong { color: #244f38; font-size: 17px; }
.compare-visual > span { color: #3d9569; font-size: 24px; }
.export-visual { gap: 20px; padding: 30px; }
.export-visual > span { width: 74px; height: 90px; border-radius: 14px; display: grid; place-items: center; background: #2e8259; color: #fff; font-size: 34px; font-weight: 800; box-shadow: 0 18px 30px -20px rgba(18, 69, 43, .5); }
.export-visual div { display: grid; gap: 8px; text-align: left; }
.export-visual strong { font-size: 18px; }
.export-visual small { color: #678071; }

.quick-start-card {
  min-height: 190px;
  padding: 36px 40px;
  border: 1px solid #a9d9ba;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: linear-gradient(135deg, rgba(211, 247, 224, .96), rgba(249, 255, 251, .96));
  color: var(--formatter-ink);
  box-shadow: var(--formatter-shadow);
}
.quick-start-card > div > span { color: #367d59; font-size: 13px; font-weight: 800; }
.quick-start-card h3 { margin: 12px 0 0; font-size: 32px; letter-spacing: -.035em; }
.quick-start-card p { margin: 12px 0 0; color: #5f7466; }
.quick-start-card > strong { min-width: 150px; min-height: 52px; padding: 0 24px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--formatter-accent-dark); color: #fff; white-space: nowrap; }

.faq-list { max-width: 900px; margin: 0 auto; border-top: 1px solid #bbd7c5; }
.faq-list details { border-bottom: 1px solid #bbd7c5; background: rgba(255, 255, 255, .25); }
.faq-list summary { min-height: 82px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; font-size: 18px; font-weight: 750; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span { color: #3e825f; font-size: 24px; font-weight: 400; }
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list details p { max-width: 720px; margin: -4px 0 0; padding: 0 12px 26px; color: #617568; line-height: 1.8; }

/* Footer */
.landing-footer { padding: 32px 0 26px; border: 0; background: transparent; color: var(--formatter-ink); }
.landing-footer-bar {
  min-height: 64px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--formatter-shadow);
}
.landing-footer-bar nav { display: flex; align-items: center; justify-content: center; gap: 8px; }
.landing-footer-bar nav a { padding: 9px 11px; color: #4c6254; font-size: 13px; font-weight: 600; }
.landing-footer .footer-bottom { padding: 22px 8px 0; color: #668072; font-size: 12px; }

/* First visit dialog */
.visitor-dialog-layer { background: rgba(15, 43, 29, .34); backdrop-filter: blur(6px); }
.visitor-dialog {
  width: min(calc(100% - 32px), 430px);
  padding: 34px;
  border: 1px solid #b9ddc7;
  border-radius: 28px;
  background: #fbfffc;
  box-shadow: 0 36px 80px -34px rgba(14, 54, 32, .55);
  color: var(--formatter-ink);
}
.visitor-dialog-mark { background: var(--formatter-accent-soft); color: #2f8058; }
.visitor-id-box { border-color: #c6e2d0; background: #effaf3; }
.visitor-start-button { border-radius: 999px; background: var(--formatter-accent-dark); }

/* Formatting workbench */
body.format-page {
  min-height: 100dvh;
  background-color: #f8fcf9;
  background-image:
    linear-gradient(rgba(55, 139, 95, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 139, 95, .055) 1px, transparent 1px);
  background-size: 68px 68px;
  color: var(--formatter-ink);
}

body.format-page .alto-nav.format-tool-header[data-site-shell-header] {
  position: sticky !important;
  z-index: 40;
  top: 0;
  width: 100%;
  height: 70px !important;
  min-height: 70px !important;
  margin: 0;
  border: 0 !important;
  background: var(--formatter-accent-dark) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-shell { position: relative; width: 100% !important; max-width: none; height: 70px !important; padding: 0 32px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.format-back-link {
  justify-self: start;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f2fff6;
  font-size: 13px;
  font-weight: 700;
}
.format-back-link:hover { border-color: rgba(255, 255, 255, .48); background: rgba(255, 255, 255, .08); }
.format-tool-title { justify-self: center; color: #f8fffa; font-size: 19px; font-weight: 800; letter-spacing: .02em; }
body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-actions { justify-self: end; gap: 10px !important; padding-left: 22px !important; border-left: 1px solid rgba(255, 255, 255, .14) !important; }
body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-user { color: #e6f6ec; }
body.format-page .alto-nav.format-tool-header[data-site-shell-header] .user-avatar { border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: #fff; }

.format-page .format-step-nav {
  width: min(calc(100% - 48px), 760px);
  min-height: 50px;
  margin: 28px auto 0;
  padding: 0;
  border: 0;
  grid-template-columns: auto 50px auto 50px auto;
  justify-content: center;
  background: transparent;
  box-shadow: none;
}
.format-page[data-format-step="upload"] .format-step-nav { display: none; }
.format-step-nav > a { min-height: 38px; padding: 0 8px; gap: 8px; opacity: .48; transform: none !important; }
.format-step-nav > a > b { width: 28px; height: 28px; border: 1px solid #bfd6c8; border-radius: 9px; background: #fff; color: #60796a; }
.format-step-nav > a.active,
.format-step-nav > a.done,
.format-step-nav > a.available { opacity: 1; }
.format-step-nav > a.active > b,
.format-step-nav > a.done > b { border-color: var(--formatter-accent); background: var(--formatter-accent-dark); color: #fff; }
.format-step-nav strong { font-size: 13px; }
.format-step-nav > i { width: 30px; height: 1px; background: #bfd6c8; }
.format-step-nav > i::after { animation: none !important; }

.format-main,
.format-page .format-main {
  width: min(calc(100% - 48px), 1060px);
  max-width: 1060px;
  margin: 0 auto;
  padding: 70px 0 88px;
  overflow: visible;
}
.format-page[data-format-step="adjust"] .format-main,
.format-page[data-format-step="export"] .format-main { padding-top: 36px; }

.format-page[data-format-step="upload"] [data-stage="upload"] { display: block; animation: none !important; }
.upload-stage > .stage-intro { margin: 0 0 38px; text-align: center; }
.upload-stage > .stage-intro > span { display: block; margin-bottom: 8px; color: #418261; font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.upload-stage > .stage-intro h2 { display: inline-flex; align-items: center; justify-content: center; gap: 14px; margin: 0; font-size: clamp(34px, 4vw, 44px); letter-spacing: -.035em; }
.upload-stage > .stage-intro h2::before { content: ""; width: 22px; height: 27px; border: 2px solid #173f2e; border-radius: 3px; box-shadow: inset 0 -7px 0 #dff5e8; }
.upload-stage > .stage-intro p { display: block; margin: 14px 0 0; color: #687b6f; font-size: 14px; }

.upload-grid,
.upload-stage > .upload-grid {
  width: min(100%, 760px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.upload-grid .format-card {
  position: relative;
  min-height: 286px;
  padding: 24px 22px 22px;
  border: 2px dashed #bfd1c5;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, .82);
  box-shadow: none;
  transform: none !important;
  transition: border-color .18s ease, background .18s ease;
}
.upload-grid .format-card:hover { border-color: #73ad89; background: rgba(255, 255, 255, .96); box-shadow: none; transform: none; }
.upload-kicker { color: #6d7d73; font-size: 11px; letter-spacing: .2em; }
.upload-kicker::after { content: ""; position: absolute; top: 27px; right: 22px; width: 9px; height: 9px; border-radius: 50%; background: #d7ded9; }

.upload-grid .card-title { margin-top: 28px; display: flex; align-items: flex-start; justify-content: center; text-align: center; }
.upload-grid .card-title > div { display: grid; gap: 10px; }
.upload-grid .card-title h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.upload-grid .card-title p { display: block; margin: 0; color: #75847b; font-size: 12px; line-height: 1.6; }
.upload-grid .card-title > em { position: absolute; top: 24px; right: 22px; padding: 0; background: transparent; color: #8a958e; font-size: 10px; }
.upload-grid .quiet-button { position: absolute; top: 48px; right: 22px; z-index: 2; margin: 0; padding: 5px 8px; border: 0; border-radius: 8px; background: #edf7f1; color: #3f7256; }

.upload-grid .file-drop,
.upload-grid .file-drop.compact {
  min-height: 94px;
  margin: 20px 0 0;
  padding: 12px 8px;
  border: 0;
  border-radius: 12px;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  text-align: center;
  transform: none !important;
}
.upload-grid .file-drop:hover,
.upload-grid .file-drop.dragging,
.upload-grid .file-drop.has-file { background: var(--formatter-accent-soft); }
.upload-grid .word-file-icon { display: none; }
.upload-grid .file-drop > div { display: grid; gap: 8px; }
.upload-grid .file-drop strong,
.upload-grid .source-upload-card .file-drop strong { font-size: 13px; font-weight: 700; }
.upload-grid .file-drop small { color: #77877d; font-size: 11px; }
.upload-grid .file-drop > b { display: none; }

.upload-grid .selected-template-card {
  min-height: 52px;
  margin: 16px 0 0;
  padding: 8px 10px;
  border: 1px solid #d9e8de;
  border-radius: 12px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  background: #f4fbf7;
  text-align: left;
}
.upload-grid .school-choice-mark { width: 34px; height: 34px; border-radius: 10px; background: #e1f3e8; color: #397b58; }
.upload-grid .selected-template-card strong { font-size: 11px; }
.upload-grid .selected-template-card small { display: none; }
.upload-grid .selected-template-card a { color: #317b55; font-size: 10px; font-weight: 800; }
.upload-grid .or-line { margin: 8px 0 0; }
.upload-grid .or-line::before,
.upload-grid .or-line::after { background: #e2ece5; }
.upload-grid .or-line span { color: #93a097; font-size: 10px; }
.template-choice-card .file-drop.compact { min-height: 58px; margin-top: 2px; padding: 7px; }

.template-metadata,
.requirement-card {
  width: min(100%, 760px);
  margin: 20px auto 0;
  border: 1px solid #d4e6da;
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: none;
}
.template-metadata { overflow: hidden; }
.template-metadata[hidden] { display: none !important; }
.metadata-heading { padding: 20px 22px 0; }
.metadata-heading h3 { font-size: 16px; }
.metadata-heading p { display: block; color: #74867a; }
.metadata-grid { padding: 18px 22px 22px; }
.metadata-grid input,
.metadata-grid select,
.metadata-grid textarea { border-color: #cee0d4; border-radius: 10px; background: #fbfefc; }

details.requirement-card { padding: 0; overflow: hidden; }
.requirement-card > summary { min-height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-size: 14px; font-weight: 750; }
.requirement-card > summary::-webkit-details-marker { display: none; }
.requirement-card > summary small { color: #738479; font-size: 11px; font-weight: 600; }
.requirement-card > summary::after { content: "+"; margin-left: 12px; color: #3b805c; font-size: 20px; font-weight: 400; }
.requirement-card[open] > summary::after { transform: rotate(45deg); }
.requirement-content { padding: 0 20px 20px; border-top: 1px solid #e2ede6; }
.requirement-content .card-title { padding-top: 18px; }
.requirement-content .card-title h3 { font-size: 14px; }
.prompt-field { margin-top: 12px; }
.prompt-field textarea { min-height: 110px; border-color: #cee0d4; border-radius: 12px; background: #fbfefc; }
.prompt-field textarea:focus { border-color: #69a982; box-shadow: 0 0 0 3px rgba(69, 167, 120, .13); }

.stage-action {
  width: min(100%, 760px);
  min-height: auto;
  margin: 28px auto 0;
  padding: 0;
  border: 0;
  display: flex;
  justify-content: center;
  background: transparent;
  box-shadow: none;
}
.stage-action > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stage-action .primary-button {
  width: 210px;
  min-height: 52px;
  border: 1px solid var(--formatter-accent);
  border-radius: 999px;
  background: var(--formatter-accent-dark);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.stage-action .primary-button:disabled { border-color: #d7d9dc; background: #d7d9dc; color: #fff; opacity: 1; }
.stage-action .primary-button:hover:not(:disabled) { background: #102f22; transform: translateY(-1px) !important; }

/* Adjust and export retain the original workflow with the reference styling. */
.adjust-stage,
.export-stage { gap: 20px; }
.adjust-stage .stage-intro,
.export-stage .stage-intro { margin: 0 0 24px; }
.adjust-stage .stage-intro h2,
.export-stage .stage-intro h2 { font-size: 34px; letter-spacing: -.035em; }
.adjust-stage .stage-intro p,
.export-stage .stage-intro p { display: block; color: #65786c; }
.analysis-pane,
.plan-pane,
.export-workbench {
  border: 1px solid #cfe2d5;
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--formatter-shadow);
}
.pane-heading { border-bottom-color: #dcebe1; }
.pane-index,
.section-title span,
.parser-badge,
.variant-badge { border-radius: 9px; background: var(--formatter-accent-soft); color: #317754; }
.primary-button,
.download-button {
  border-radius: 999px;
  background: var(--formatter-accent-dark);
  color: #fff;
}
.primary-button:hover:not(:disabled),
.download-button:hover:not(:disabled) { background: #102f22; }
.back-button { border-radius: 999px; border-color: #c5dccd; background: #fff; color: #315b43; }
.diff-row,
.role-plan-item,
.profile-grid > div,
.stat-grid > div { border-color: #dae9df; background: #f8fcf9; }
.target-control input,
.target-control select { border-color: #cbded2; background: #fff; }
.export-status-column { background: var(--formatter-accent-dark); color: #fff; }
.export-action-card { background: #f6fcf8; }

/* Template library */
body.templates-page .inner-main { padding-top: 50px; }
body.templates-page .inner-hero { border: 0; background: transparent; }
body.templates-page .inner-hero-grid { padding: 54px 0 42px; }
body.templates-page .inner-hero h1 { color: var(--formatter-ink); font-size: 48px; letter-spacing: -.045em; }
body.templates-page .inner-hero p { color: var(--formatter-muted); }
body.templates-page .hero-stat,
body.templates-page .surface-card,
body.templates-page .template-card { border-color: #cde3d5; border-radius: var(--formatter-card-radius); background: rgba(255, 255, 255, .9); box-shadow: var(--formatter-shadow); }
body.templates-page .section-tag { border-radius: 999px; background: var(--formatter-accent-soft); color: #347b57; }
body.templates-page input,
body.templates-page select { border-color: #cadfd1; border-radius: 12px; background: #fbfefc; }
body.templates-page .compact-footer { border: 0; background: transparent; color: var(--formatter-ink); }

/* Responsive */
@media (max-width: 960px) {
  .landing-hero { padding-inline: 70px; }
  .feature-row { grid-template-columns: 1fr; gap: 26px; }
  .feature-row.reverse .feature-copy,
  .feature-row.reverse .feature-visual { order: initial; }
  .feature-visual { min-height: 190px; }
  .nav-user.nav-visitor { display: none; }
}

@media (max-width: 760px) {
  .page-shell,
  .format-page .format-main,
  .format-page .format-step-nav { width: min(calc(100% - 28px), 1152px); }

  body.home-page .alto-nav,
  body.templates-page .alto-nav { top: 10px; width: calc(100% - 24px); margin-top: 12px; border-radius: 22px; }
  body.home-page .alto-nav .nav-shell,
  body.templates-page .alto-nav .nav-shell { height: 58px; padding: 0 14px; }
  .alto-brand img { width: 30px; height: 30px; }
  .alto-brand b { font-size: 15px; }
  .nav-toggle { display: flex; }
  body.home-page .alto-links,
  body.templates-page .alto-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    padding: 10px;
    border: 1px solid #cfe3d6;
    border-radius: 18px;
    display: none;
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--formatter-shadow);
  }
  body.home-page .alto-links.open,
  body.templates-page .alto-links.open { display: grid; }
  body.home-page .alto-links a,
  body.templates-page .alto-links a { justify-content: flex-start; }
  .nav-actions .nav-task { min-height: 38px; padding-inline: 16px; }

  .landing-hero { min-height: 520px; padding: 82px 16px 28px; }
  .landing-hero h1 { margin-top: 24px; font-size: clamp(36px, 10vw, 48px); }
  .landing-hero h2 { margin-top: 20px; font-size: clamp(28px, 8vw, 38px); }
  .landing-hero > p { margin-top: 22px; font-size: 15px; }
  .landing-actions { margin-top: 26px; }
  .landing-primary,
  .landing-secondary { min-width: 0; min-height: 48px; padding-inline: 22px; }
  .hero-chip { display: none; }
  .landing-section { margin-top: 58px; scroll-margin-top: 90px; }
  .landing-section-heading { margin-bottom: 26px; }
  .landing-section-heading h2 { font-size: 34px; }
  .landing-section-heading p { font-size: 14px; }
  .flow-grid { grid-template-columns: 1fr; gap: 12px; }
  .flow-grid article { min-height: 0; padding: 24px; }
  .flow-grid h3 { margin-top: 18px; }
  .feature-row { min-height: 0; padding: 24px; border-radius: 24px; }
  .feature-copy h3 { font-size: 29px; }
  .feature-copy p { font-size: 14px; }
  .compare-visual { flex-direction: column; }
  .compare-visual > span { transform: rotate(90deg); }
  .quick-start-card { padding: 28px 24px; flex-direction: column; align-items: flex-start; }
  .quick-start-card > strong { width: 100%; }
  .faq-list summary { min-height: 72px; padding-inline: 4px; font-size: 16px; }
  .landing-footer-bar { padding: 14px; border-radius: 24px; flex-wrap: wrap; }
  .landing-footer-bar nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; }
  .landing-footer-bar .footer-start { min-height: 40px; padding-inline: 17px; }

  body.format-page .alto-nav.format-tool-header[data-site-shell-header],
  body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-shell { height: 62px !important; min-height: 62px !important; }
  body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-shell { width: 100% !important; padding: 0 14px; }
  .format-back-link { min-height: 36px; padding: 0 12px; font-size: 12px; }
  .format-tool-title { font-size: 16px; }
  body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-actions { display: none; }
  .format-main,
  .format-page .format-main { padding: 48px 0 60px; }
  .upload-stage > .stage-intro { margin-bottom: 28px; }
  .upload-stage > .stage-intro h2 { font-size: 34px; }
  .upload-grid,
  .upload-stage > .upload-grid { grid-template-columns: 1fr; gap: 16px; }
  .upload-grid .format-card { min-height: 250px; }
  .template-metadata,
  .requirement-card { margin-top: 16px; }
  .metadata-grid { grid-template-columns: 1fr; }
  .metadata-grid label,
  .metadata-grid label.wide { grid-column: 1 !important; }
  .stage-action { margin-top: 22px; }
  .stage-action .primary-button { width: 100%; }
  .adjust-stage .stage-intro h2,
  .export-stage .stage-intro h2 { font-size: 29px; }
}

@media (max-width: 430px) {
  .nav-actions { display: none; }
  .landing-hero { padding-top: 70px; }
  .landing-actions { width: 100%; flex-direction: column; }
  .landing-primary,
  .landing-secondary { width: 100%; }
  .hero-kicker { font-size: 12px; }
  .format-back-link { padding-inline: 10px; }
  .format-back-link span { display: none; }
  .format-tool-title { justify-self: end; }
  body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-shell { grid-template-columns: auto 1fr; }
  .upload-grid .format-card { min-height: 240px; padding-inline: 18px; }
}

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

/* Keep the anonymous visitor identity accessible on phones. */
@media (max-width: 760px) {
  body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-shell {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
  }
  body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-actions,
  .alto-nav[data-site-shell-header] .nav-actions {
    display: flex !important;
  }
  .alto-nav[data-site-shell-header] .nav-actions .nav-task { display: none !important; }
  .alto-nav[data-site-shell-header] .nav-user.nav-visitor {
    display: inline-flex !important;
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .alto-nav[data-site-shell-header] .nav-user.nav-visitor > span:last-child { display: none; }
  .alto-nav[data-site-shell-header] .nav-user.nav-visitor {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    justify-content: center;
  }
}

/* Reference-aligned landing and upload layout. */
html { scrollbar-width: thin; scrollbar-color: rgba(23, 63, 46, .42) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(23, 63, 46, .36); }
body.home-page { background-color: #effaf3; background-image: linear-gradient(rgba(55, 139, 95, .075) 1px, transparent 1px), linear-gradient(90deg, rgba(55, 139, 95, .075) 1px, transparent 1px), radial-gradient(circle at 50% 14%, rgba(202, 247, 218, .82), transparent 39%); }
body.home-page .landing-footer { display: none !important; }

body.home-page .alto-nav[data-site-shell-header] {
  top: 18px;
  width: min(calc(100% - 48px), 1152px);
  height: 64.8px !important;
  min-height: 64.8px !important;
  margin: 24px auto 0;
}
body.home-page .alto-nav[data-site-shell-header] .nav-shell {
  height: 64.8px !important;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
body.home-page .alto-nav[data-site-shell-header] .alto-brand { justify-self: start; }
body.home-page .alto-nav[data-site-shell-header] .alto-links { justify-self: center; gap: 8px !important; }
body.home-page .alto-nav[data-site-shell-header] .alto-links a { height: 40px !important; min-height: 40px; padding: 0 12px !important; }
body.home-page .alto-nav[data-site-shell-header] .nav-actions { justify-self: end; }
body.home-page .alto-nav[data-site-shell-header] .nav-task { min-height: 44px; padding-inline: 20px; }

.landing-main {
  width: calc(100% - 80px);
  max-width: 1360px;
  margin-inline: auto;
  padding: 96px 0 80px;
}
.landing-hero.page-shell {
  width: min(100%, 1024px);
  height: 384.8px;
  min-height: 0;
  margin-top: 24px;
  padding: 0 32px;
}
.hero-kicker { height: 37.6px; min-height: 37.6px; padding: 8px 16px; font-size: 14px; line-height: 20px; }
.hero-kicker span { font-size: 18px; }
.landing-hero h1 { max-width: 100%; margin-top: 32px; font-size: 60px; line-height: 60px; white-space: nowrap; }
.landing-hero h2 { max-width: 100%; margin-top: 32px; font-size: 48px; line-height: 60px; white-space: nowrap; }
.landing-hero > p { max-width: 760px; margin-top: 32px; font-size: 20px; line-height: 32px; }
.landing-actions { height: 59.2px; margin-top: 40px; gap: 16px; }
.landing-actions .landing-primary,
.landing-actions .landing-secondary { height: 59.2px; min-height: 59.2px; padding: 0 32px; font-size: 16px; line-height: 24px; }
.hero-chip { padding: 8px 16px; font-size: 12px; line-height: 16px; }
.chip-template { top: 57px; left: -26px; }
.chip-preview { top: 32px; right: -18px; }
.chip-format { top: 219px; left: 30px; }
.chip-export { top: 251px; right: 30px; }

.landing-section { margin-top: 0; scroll-margin-top: 96px; }
.landing-section-heading { margin-bottom: 0; }
.landing-section-heading h2 { font-size: 48px; line-height: 48px; }
.flow-section { width: min(100%, 1152px); margin-top: 96px; }
.flow-section .landing-section-heading { height: 104px; }
.flow-section .landing-section-heading p { margin-top: 24px; font-size: 24px; font-weight: 600; line-height: 32px; }
.flow-grid { height: 193.6px; margin-top: 40px; gap: 16px; }
.flow-grid article { height: 193.6px; min-height: 193.6px; padding: 28px 24px; border-radius: 28px; }
.flow-grid h3 { margin-top: 16px; font-size: 20px; line-height: 28px; }
.flow-grid p { margin-top: 12px; font-size: 14px; line-height: 28px; }

.features-section.page-shell { width: 100%; margin-top: 64px; padding-top: 0; }
.features-section .landing-section-heading { height: 48px; }
.feature-intro { width: min(100%, 768px); min-height: 64px; margin: 20px auto 0; color: #4f6a59; font-size: 18px; line-height: 32px; text-align: center; }
.feature-stack { height: 480px; margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.feature-row,
.feature-row.reverse {
  height: 480px;
  min-height: 480px;
  padding: 32px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(243, 250, 245, .97));
}
.feature-row.reverse .feature-copy { order: initial; }
.feature-copy h3 { max-width: none; margin: 0; font-size: 24px; line-height: 32px; letter-spacing: -.03em; }
.feature-copy p { max-width: none; margin-top: 20px; color: #57705f; font-size: 14px; line-height: 32px; }
.feature-points { margin: 32px 0 0; padding: 0; display: grid; gap: 24px; list-style: none; }
.feature-points li { position: relative; min-height: 32px; padding-left: 40px; color: #21402f; font-size: 14px; line-height: 32px; }
.feature-points li::before { content: "✓"; position: absolute; top: 4px; left: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #e7f7ec; color: #198754; font-size: 14px; font-weight: 800; line-height: 24px; }

.quick-start-section { width: min(100%, 1152px); margin-top: 64px; }
.quick-start-section .landing-section-heading { height: 48px; }
.quick-start-grid { width: min(100%, 1024px); height: 304.8px; margin: 32px auto 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.quick-start-card {
  width: 100%;
  max-width: 460px;
  height: 304.8px;
  min-height: 304.8px;
  margin-inline: auto;
  padding: 28px;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  background: rgba(255, 255, 255, .9);
}
.quick-card-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: #e9f8ee; color: #198754; font-size: 16px; font-weight: 800; }
.quick-start-card h3 { margin-top: 20px; font-size: 24px; line-height: 32px; }
.quick-start-card p { margin-top: 12px; color: #57705f; font-size: 14px; line-height: 28px; }
.quick-start-card > strong { min-width: 0; min-height: 48px; margin-top: auto; padding: 0 24px; font-size: 14px; }
.quick-template-card { border-color: #cfe5d7; background: linear-gradient(180deg, rgba(249, 253, 250, .96), rgba(237, 248, 241, .96)); }

.faq-section { width: min(100%, 1024px); margin-top: 96px; }
.faq-section .landing-section-heading { height: 48px; }
.faq-list { width: 100%; max-width: none; height: 227.2px; margin-top: 40px; border: 0; display: grid; gap: 16px; }
.faq-list article { height: 105.6px; padding: 20px 24px; border: 1px solid rgba(207, 229, 215, .9); border-radius: 28px; background: rgba(255, 255, 255, .88); box-shadow: 0 20px 46px -38px rgba(18, 69, 43, .28); }
.faq-list h3 { margin: 0; color: #173222; font-size: 18px; line-height: 28px; }
.faq-list p { margin: 8px 0 0; color: #57705f; font-size: 14px; line-height: 28px; }
.faq-section > .privacy-note { height: 20px; margin: 32px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #5f7768; font-size: 14px; line-height: 20px; }
.faq-section > .privacy-note span { width: 20px; height: 20px; display: grid; place-items: center; color: #198754; font-size: 11px; font-weight: 800; }

body.format-page .alto-nav.format-tool-header[data-site-shell-header],
body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-shell { height: 69.6px !important; min-height: 69.6px !important; }
body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-shell { padding: 0 32px; }
body.format-page[data-format-step="upload"] .format-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 98.4px 32px 64px;
}
.format-page[data-format-step="upload"] .upload-stage > .stage-intro { height: 54px; margin: 0 0 32px; }
.format-page[data-format-step="upload"] .upload-stage > .stage-intro > span,
.format-page[data-format-step="upload"] .upload-stage > .stage-intro > p { display: none; }
.format-page[data-format-step="upload"] .upload-stage > .stage-intro h2 { height: 54px; gap: 12px; font-size: 36px; line-height: 54px; letter-spacing: .06em; }
.format-page[data-format-step="upload"] .upload-stage > .stage-intro h2::before { width: 28px; height: 28px; border: 2px solid #173f2e; border-radius: 4px; box-shadow: inset 0 -7px 0 #dff5e8; }
.format-page[data-format-step="upload"] .upload-grid,
.format-page[data-format-step="upload"] .upload-stage > .upload-grid { width: 592px; margin: 0 auto; grid-template-columns: 280px 280px; gap: 32px; }
.format-page[data-format-step="upload"] .upload-grid .format-card {
  width: 280px;
  height: 236px;
  min-height: 236px;
  padding: 20px;
  border-width: 2.5px;
  border-color: #cfdad2;
  border-radius: 18px;
  justify-content: space-between;
}
.format-page[data-format-step="upload"] .upload-kicker { height: 16px; font-size: 12px; line-height: 16px; }
.format-page[data-format-step="upload"] .upload-kicker::after { top: 25px; right: 20px; width: 10px; height: 10px; }
.format-page[data-format-step="upload"] .upload-grid .card-title { margin: 0; align-items: center; justify-content: center; }
.format-page[data-format-step="upload"] .upload-grid .card-title > div { gap: 12px; }
.format-page[data-format-step="upload"] .upload-grid .card-title h3 { font-size: 18px; line-height: 32px; }
.format-page[data-format-step="upload"] .upload-grid .card-title p { font-size: 13px; line-height: 24px; }
.format-page[data-format-step="upload"] .upload-grid .card-title > em,
.format-page[data-format-step="upload"] .upload-grid .quiet-button { display: none !important; }
.format-page[data-format-step="upload"] .upload-grid .selected-template-card,
.format-page[data-format-step="upload"] .upload-grid .or-line { display: none; }
.format-page[data-format-step="upload"].has-selected-template .upload-grid .selected-template-card.active { min-height: 44px; margin: 0; padding: 5px 8px; display: grid; }
.format-page[data-format-step="upload"].has-selected-template .template-choice-card .file-drop,
.format-page[data-format-step="upload"].has-selected-template .template-choice-card .or-line { display: none; }
.format-page[data-format-step="upload"] .upload-grid .file-drop,
.format-page[data-format-step="upload"] .upload-grid .file-drop.compact {
  min-height: 40px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  display: block;
}
.format-page[data-format-step="upload"] .upload-grid .file-drop > div { gap: 4px; }
.format-page[data-format-step="upload"] .upload-grid .file-drop strong,
.format-page[data-format-step="upload"] .upload-grid .source-upload-card .file-drop strong { font-size: 13px; line-height: 20px; }
.format-page[data-format-step="upload"] .upload-grid .file-drop small { font-size: 13px; line-height: 20px; }
.format-page[data-format-step="upload"] .template-metadata,
.format-page[data-format-step="upload"] .requirement-card { display: none !important; }
.format-page[data-format-step="upload"] .stage-action { width: 100%; margin-top: 40px; }
.format-page[data-format-step="upload"] .stage-action .primary-button { width: 210px; height: 48px; min-height: 48px; padding: 0 32px; font-size: 16px; }

@media (max-width: 1100px) {
  .landing-hero h1 { font-size: 52px; }
  .landing-hero h2 { font-size: 42px; }
  .feature-row { padding: 26px; }
}

@media (max-width: 960px) {
  body.home-page .alto-nav[data-site-shell-header] { width: calc(100% - 48px); }
  .landing-main { width: calc(100% - 48px); padding-top: 72px; }
  .landing-hero.page-shell { height: auto; min-height: 520px; padding-inline: 24px; }
  .landing-hero h1,
  .landing-hero h2 { white-space: normal; }
  .landing-hero h1 { font-size: clamp(42px, 7vw, 54px); line-height: 1.12; }
  .landing-hero h2 { font-size: clamp(32px, 5.8vw, 44px); line-height: 1.2; }
  .hero-chip { display: none; }
  .flow-section { margin-top: 72px; }
  .features-section.page-shell,
  .quick-start-section { margin-top: 56px; }
  .feature-stack { height: auto; grid-template-columns: 1fr; }
  .feature-row,
  .feature-row.reverse { height: auto; min-height: 360px; }
  .quick-start-grid { height: auto; }
  .faq-section { margin-top: 72px; }
}

@media (max-width: 760px) {
  body.home-page .alto-nav[data-site-shell-header] { width: calc(100% - 24px); height: 58px !important; min-height: 58px !important; }
  body.home-page .alto-nav[data-site-shell-header] .nav-shell { height: 58px !important; grid-template-columns: 1fr auto; }
  body.home-page .alto-nav[data-site-shell-header] .alto-links { justify-self: stretch; }
  .landing-main { width: calc(100% - 28px); padding: 56px 0 56px; }
  .landing-hero.page-shell { min-height: 0; margin-top: 12px; padding: 0; }
  .landing-hero h1 { font-size: clamp(36px, 10vw, 48px); line-height: 1.15; }
  .landing-hero h2 { font-size: clamp(28px, 8vw, 38px); line-height: 1.2; }
  .landing-hero > p { font-size: 16px; line-height: 28px; }
  .landing-actions { width: 100%; height: auto; flex-direction: column; }
  .landing-actions .landing-primary,
  .landing-actions .landing-secondary { width: 100%; height: 52px; min-height: 52px; }
  .landing-section-heading h2 { font-size: 38px; line-height: 48px; }
  .flow-section .landing-section-heading { height: auto; }
  .flow-grid { height: auto; grid-template-columns: 1fr; }
  .flow-grid article { height: auto; min-height: 0; }
  .features-section .landing-section-heading { height: auto; }
  .feature-intro { min-height: 0; font-size: 16px; line-height: 28px; }
  .feature-stack { margin-top: 28px; gap: 16px; }
  .feature-row,
  .feature-row.reverse { min-height: 0; padding: 28px 24px; }
  .quick-start-grid { grid-template-columns: 1fr; gap: 16px; }
  .quick-start-card { height: 286px; min-height: 286px; }
  .faq-list { height: auto; }
  .faq-list article { height: auto; min-height: 105.6px; }
  .faq-section > .privacy-note { height: auto; text-align: center; }

  body.format-page[data-format-step="upload"] .format-main { padding: 48px 16px 56px; }
  .format-page[data-format-step="upload"] .upload-stage > .stage-intro { height: 48px; margin-bottom: 28px; }
  .format-page[data-format-step="upload"] .upload-stage > .stage-intro h2 { height: 48px; font-size: 32px; line-height: 48px; }
  .format-page[data-format-step="upload"] .upload-grid,
  .format-page[data-format-step="upload"] .upload-stage > .upload-grid { width: 100%; grid-template-columns: 1fr; gap: 16px; }
  .format-page[data-format-step="upload"] .upload-grid .format-card { width: min(100%, 280px); margin-inline: auto; }
  .format-page[data-format-step="upload"] .stage-action { margin-top: 28px; }
}

/* Upload step interaction repair: the card is the file control. */
html:has(body.format-page[data-format-step="upload"]) {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body.format-page[data-format-step="upload"] {
  height: auto;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: visible;
  display: block;
}

body.format-page[data-format-step="upload"] .format-main {
  min-height: calc(100dvh - 69.6px);
  overflow: visible;
}

.format-page[data-format-step="upload"] .upload-grid .format-card {
  position: relative;
  isolation: isolate;
  cursor: pointer;
}

.format-page[data-format-step="upload"] .upload-grid .file-drop,
.format-page[data-format-step="upload"] .upload-grid .file-drop.compact,
.format-page[data-format-step="upload"].has-selected-template .template-choice-card .file-drop {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 20px;
  border: 0;
  border-radius: 16px;
  display: flex !important;
  align-items: flex-end;
  justify-content: flex-start;
  background: transparent;
  transform: none;
  cursor: pointer;
}

.format-page[data-format-step="upload"] .upload-grid .file-drop:hover,
.format-page[data-format-step="upload"] .upload-grid .file-drop.dragging,
.format-page[data-format-step="upload"] .upload-grid .file-drop.has-file {
  background: transparent;
  transform: none;
}

.format-page[data-format-step="upload"] .upload-grid .file-drop > div {
  width: 100%;
  flex: 0 0 auto;
  margin-top: auto;
  pointer-events: none;
}

.format-page[data-format-step="upload"] .upload-grid .selected-template-card {
  display: none !important;
}

.format-page[data-format-step="upload"] .upload-grid .format-card:has(.file-drop:hover),
.format-page[data-format-step="upload"] .upload-grid .format-card:has(.file-drop:focus-visible),
.format-page[data-format-step="upload"] .upload-grid .format-card:has(.file-drop.dragging) {
  border-color: #6fa989;
  background: #fbfefc;
  box-shadow: 0 0 0 4px rgba(82, 156, 111, .1);
}

.format-page[data-format-step="upload"] .upload-grid .format-card:has(.file-drop.has-file) {
  border-style: solid;
  border-color: #6fa989;
  background: #f6fcf8;
}

.format-page[data-format-step="upload"] .stage-action {
  align-items: center;
}

@media (max-width: 760px) {
  body.format-page[data-format-step="upload"] .format-main {
    min-height: calc(100dvh - 62px);
    padding-bottom: 48px;
  }

  .format-page[data-format-step="upload"] .stage-action .primary-button {
    width: min(100%, 280px);
  }
}

/* Green v4: compact confirmation flow, optional templates and calm motion. */
.nav-user.nav-visitor {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-user.nav-visitor:focus-visible,
.account-quota:focus-visible,
.preview-button:focus-visible,
.style-preview-dialog button:focus-visible {
  outline: 3px solid rgba(69, 167, 120, .24);
  outline-offset: 3px;
}

@media (min-width: 761px) {
  body.home-page .alto-nav[data-site-shell-header] .alto-links {
    white-space: nowrap;
  }

  body.home-page .alto-nav[data-site-shell-header] .alto-links > a {
    box-sizing: border-box;
    flex: 0 0 auto;
    justify-content: center;
    transform: none !important;
  }

  body.home-page .alto-nav[data-site-shell-header] .alto-links > a:nth-of-type(1),
  body.home-page .alto-nav[data-site-shell-header] .alto-links > a:nth-of-type(3) { width: 62px; }
  body.home-page .alto-nav[data-site-shell-header] .alto-links > a:nth-of-type(2),
  body.home-page .alto-nav[data-site-shell-header] .alto-links > a:nth-of-type(4) { width: 86px; }
}

.landing-hero { isolation: isolate; }
.landing-hero::before,
.landing-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.landing-hero::before {
  top: 3%;
  left: 50%;
  width: min(680px, 72vw);
  height: min(360px, 38vw);
  background: radial-gradient(circle, rgba(133, 220, 165, .27), rgba(200, 244, 216, .08) 48%, transparent 72%);
  filter: blur(2px);
  transform: translateX(-50%);
}
.landing-hero::after {
  top: 74px;
  left: 50%;
  width: min(840px, 84vw);
  height: 250px;
  border: 1px solid rgba(73, 152, 103, .11);
  transform: translateX(-50%) rotate(-2deg);
}

.landing-hero h1 {
  position: relative;
  text-wrap: balance;
  text-shadow: 0 18px 52px rgba(22, 80, 49, .08);
}

.landing-primary,
.landing-secondary,
.nav-task { position: relative; overflow: hidden; }
.landing-primary::after,
.nav-task::after {
  content: "";
  position: absolute;
  top: -80%;
  left: -38%;
  width: 24%;
  height: 260%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
  transform: rotate(18deg) translateX(-260%);
  transition: transform .55s ease;
  pointer-events: none;
}
.landing-primary:hover::after,
.nav-task:hover::after { transform: rotate(18deg) translateX(720%); }

.flow-grid article,
.feature-row,
.quick-start-card,
.faq-list article {
  position: relative;
  overflow: hidden;
}
.flow-grid article::after,
.feature-row::after,
.quick-start-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, .34), transparent 70%);
  opacity: 0;
  transform: translateX(-20%);
  transition: opacity .3s ease, transform .5s ease;
  pointer-events: none;
}
.flow-grid article:hover::after,
.feature-row:hover::after,
.quick-start-card:hover::after { opacity: 1; transform: translateX(14%); }

.home-motion-ready [data-home-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .58s ease var(--reveal-delay, 0ms), transform .58s cubic-bezier(.2, .72, .2, 1) var(--reveal-delay, 0ms), box-shadow .28s ease, border-color .28s ease;
}
.home-motion-ready [data-home-reveal].is-visible { opacity: 1; transform: none; }
.home-motion-ready [data-home-reveal].is-visible:hover { transform: translateY(-4px); }

@media (prefers-reduced-motion: no-preference) {
  .home-page.site-ready .hero-kicker { animation: homeHeroIn .48s ease both; }
  .home-page.site-ready .landing-hero h1 { animation: homeHeroIn .62s .08s cubic-bezier(.16, 1, .3, 1) both; }
  .home-page.site-ready .landing-actions { animation: homeHeroIn .56s .16s ease both; }
  .home-page.site-ready .landing-hero::before { animation: homeAura 8s ease-in-out infinite alternate; }
  .home-page.site-ready .chip-template,
  .home-page.site-ready .chip-format { animation: chipFloatA 5.8s ease-in-out infinite; }
  .home-page.site-ready .chip-preview,
  .home-page.site-ready .chip-export { animation: chipFloatB 6.4s ease-in-out infinite; }
}

@keyframes homeHeroIn {
  from { opacity: 0; transform: translateY(18px); }
}
@keyframes homeAura {
  from { opacity: .72; transform: translateX(-50%) translateY(-8px) scale(.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(8px) scale(1.04); }
}
@keyframes chipFloatA {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -7px; }
}
@keyframes chipFloatB {
  0%, 100% { margin-top: -2px; }
  50% { margin-top: 6px; }
}

.format-page .account-quota {
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.format-page .account-quota:hover b { color: #1d7651; }

.format-page[data-format-step="upload"] .requirement-card {
  width: min(100%, 592px);
  margin: 18px auto 0;
  border: 1px solid #cfe1d5;
  border-radius: 16px;
  display: block !important;
  overflow: hidden;
  background: rgba(255, 255, 255, .9);
}
.format-page[data-format-step="upload"] .requirement-card > summary {
  min-height: 52px;
  padding: 0 18px;
  border-bottom: 0;
  color: #244b36;
}
.format-page[data-format-step="upload"] .requirement-card[open] > summary {
  border-bottom: 1px solid #e0ece4;
}
.format-page[data-format-step="upload"] .requirement-card > summary small {
  color: #668071;
  font-size: 12px;
}
.format-page[data-format-step="upload"] .requirement-content {
  padding: 16px 18px 18px;
  border-top: 0;
}
.format-page[data-format-step="upload"] .requirement-content .card-title {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  padding-top: 0;
}
.format-page[data-format-step="upload"] .requirement-content .card-title h3 { font-size: 14px; }
.format-page[data-format-step="upload"] .requirement-content .quiet-button {
  display: inline-flex !important;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 9px;
}
.format-page[data-format-step="upload"] .prompt-field textarea {
  min-height: 126px;
  padding: 14px 14px 30px;
  border-color: #c9ded0;
  border-radius: 12px;
  background: #fbfefc;
  font-size: 14px;
  line-height: 1.65;
  resize: vertical;
}
.format-page[data-format-step="upload"] .stage-action { margin-top: 22px; }

.format-page[data-format-step="adjust"] .adjust-stage {
  width: min(100%, 1120px);
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px !important;
}
.format-page[data-format-step="adjust"] .analysis-pane { display: none !important; }
.format-page[data-format-step="adjust"] .stage-intro.with-actions {
  margin: 0;
  align-items: end;
}
.adjust-stage-actions { display: flex; align-items: center; gap: 10px; }
.preview-button {
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid #b9d6c4;
  border-radius: 10px;
  background: #f8fcf9;
  color: #245a3d;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.preview-button:hover:not(:disabled) { border-color: #7fb092; background: #eef8f2; transform: translateY(-1px); }
.preview-button:disabled { opacity: .45; cursor: not-allowed; }

.format-page[data-format-step="adjust"] .plan-pane {
  width: 100%;
  height: min(720px, calc(100dvh - 188px));
  min-height: 480px;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 14px;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  overflow: hidden !important;
  box-shadow: 0 18px 52px -40px rgba(17, 65, 38, .34);
}
.format-page[data-format-step="adjust"] .plan-pane > #planContent,
.format-page[data-format-step="adjust"] .plan-pane > .empty-state {
  min-height: 0;
  overflow: auto;
}
.format-page[data-format-step="adjust"] .pane-heading {
  position: relative;
  min-height: 62px;
  padding: 12px 18px;
}
.format-page[data-format-step="adjust"] .pane-heading h2 { font-size: 19px; }
.format-page[data-format-step="adjust"] .plan-toolbar {
  position: sticky;
  z-index: 6;
  top: 0;
  padding: 11px 18px;
  background: rgba(238, 246, 240, .96);
  backdrop-filter: blur(10px);
}
.format-page[data-format-step="adjust"] .plan-section { padding: 14px 18px 18px; }
.format-page[data-format-step="adjust"] .plan-section + .plan-section { padding-top: 2px; }
.format-page[data-format-step="adjust"] .section-title { margin-bottom: 10px; }
.format-page[data-format-step="adjust"] .role-plan { gap: 9px; }
.format-page[data-format-step="adjust"] .role-plan-item { border-radius: 10px; overflow: hidden; }
.format-page[data-format-step="adjust"] .role-plan-head { min-height: 50px; padding: 9px 12px; }
.format-page[data-format-step="adjust"] .diff-table-head,
.format-page[data-format-step="adjust"] .diff-row {
  min-width: 560px;
  grid-template-columns: 42px minmax(160px, .72fr) minmax(280px, 1.28fr);
}
.format-page[data-format-step="adjust"] .diff-table-head { min-height: 34px; }
.format-page[data-format-step="adjust"] .diff-row { min-height: 50px; }
.format-page[data-format-step="adjust"] .diff-row > * { padding: 7px 10px; }
.format-page[data-format-step="adjust"] .current-value,
.format-page[data-format-step="adjust"] .diff-arrow { display: none !important; }
.format-page[data-format-step="adjust"] .target-control { justify-content: flex-start; }
.format-page[data-format-step="adjust"] .target-control input,
.format-page[data-format-step="adjust"] .target-control select { height: 34px; }
.format-page[data-format-step="adjust"] .adjust-footer {
  padding: 10px 14px;
  background: rgba(238, 246, 240, .98);
}
.format-page[data-format-step="adjust"] .adjust-footer .primary-button { min-height: 42px; }

body.style-preview-open { overflow: hidden !important; }
.style-preview-layer {
  position: fixed;
  z-index: 260;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(14, 35, 23, .46);
  backdrop-filter: blur(9px);
}
.style-preview-dialog {
  width: min(100%, 900px);
  max-height: min(820px, calc(100dvh - 48px));
  border: 1px solid rgba(185, 216, 197, .92);
  border-radius: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #f7fbf8;
  box-shadow: 0 34px 100px rgba(10, 44, 25, .25);
  outline: none;
}
.style-preview-dialog > header,
.style-preview-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, .88);
}
.style-preview-dialog > header { border-bottom: 1px solid #dce9e0; }
.style-preview-dialog > footer { border-top: 1px solid #dce9e0; }
.style-preview-dialog > header small { color: #62806e; font: 750 9px/1 ui-monospace, Consolas, monospace; letter-spacing: .12em; }
.style-preview-dialog > header h2 { margin: 5px 0 0; font-size: 20px; }
.style-preview-dialog > header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #eef5f0;
  color: #4e6758;
  font-size: 24px;
  cursor: pointer;
}
.style-preview-dialog > footer span { color: #6b7e72; font-size: 12px; }
.style-preview-dialog > footer button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #173f2e;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.style-preview-canvas {
  min-height: 0;
  padding: 30px;
  overflow: auto;
  background-image: linear-gradient(rgba(78, 145, 103, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(78, 145, 103, .07) 1px, transparent 1px);
  background-size: 28px 28px;
}
.style-preview-paper {
  --preview-margin-top: 36px;
  --preview-margin-right: 36px;
  --preview-margin-bottom: 36px;
  --preview-margin-left: 42px;
  width: min(100%, 620px);
  min-height: 690px;
  margin: 0 auto;
  padding: var(--preview-margin-top) var(--preview-margin-right) var(--preview-margin-bottom) var(--preview-margin-left);
  background: #fff;
  color: #111;
  box-shadow: 0 24px 60px -36px rgba(14, 45, 26, .44), 0 0 0 1px rgba(73, 104, 84, .12);
  transition: width .22s ease, padding .22s ease;
}
.style-preview-paper.landscape { width: min(100%, 760px); min-height: 520px; }
.style-preview-paper h1,
.style-preview-paper h2,
.style-preview-paper h3,
.style-preview-paper p { max-width: 100%; }

@media (max-width: 760px) {
  .home-motion-ready [data-home-reveal],
  .home-motion-ready [data-home-reveal].is-visible,
  .home-motion-ready [data-home-reveal].is-visible:hover { opacity: 1; transform: none; }
  .landing-hero::after { display: none; }

  .format-page[data-format-step="upload"] .requirement-card { width: min(100%, 430px); }
  .format-page[data-format-step="upload"] .requirement-card > summary { align-items: flex-start; gap: 6px; flex-direction: column; justify-content: center; }
  .format-page[data-format-step="upload"] .requirement-card > summary::after { position: absolute; right: 18px; }
  .format-page[data-format-step="upload"] .requirement-content { padding: 14px; }

  .format-page[data-format-step="adjust"] .stage-intro.with-actions { align-items: stretch; flex-direction: column; }
  .adjust-stage-actions { width: 100%; }
  .adjust-stage-actions > * { flex: 1; text-align: center; justify-content: center; }
  .format-page[data-format-step="adjust"] .plan-pane { height: calc(100dvh - 240px); min-height: 460px; }
  .format-page[data-format-step="adjust"] .diff-table-head { display: grid; }
  .format-page[data-format-step="adjust"] .diff-table-head,
  .format-page[data-format-step="adjust"] .diff-row {
    min-width: 0;
    grid-template-columns: 34px minmax(100px, .74fr) minmax(150px, 1.26fr);
  }
  .format-page[data-format-step="adjust"] .plan-section { padding-inline: 10px; }
  .format-page[data-format-step="adjust"] .target-control { flex-wrap: wrap; }
  .format-page[data-format-step="adjust"] .adjust-footer > span { display: none; }

  .style-preview-layer { padding: 10px; align-items: end; }
  .style-preview-dialog { max-height: calc(100dvh - 20px); border-radius: 16px; }
  .style-preview-dialog > header,
  .style-preview-dialog > footer { padding: 13px 14px; }
  .style-preview-dialog > footer span { display: none; }
  .style-preview-canvas { padding: 16px; }
  .style-preview-paper,
  .style-preview-paper.landscape { width: 100%; min-height: 580px; }
}

.format-page[data-format-step="upload"] .upload-grid .upload-kicker {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.format-page[data-format-step="upload"] .upload-grid .card-title {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 20px;
  left: 20px;
  margin: 0;
  transform: translateY(-58%);
  pointer-events: none;
}

.format-page[data-format-step="upload"] .upload-grid .card-title p {
  display: none;
}

.format-page[data-format-step="upload"] .upload-grid .file-drop strong,
.format-page[data-format-step="upload"] .upload-grid .source-upload-card .file-drop strong {
  font-size: 12.5px;
  line-height: 18px;
}

.format-page[data-format-step="upload"] .upload-grid .file-drop small {
  display: block !important;
  font-size: 11px;
  line-height: 16px;
}

.format-page[data-format-step="upload"] .stage-action .primary-button:disabled {
  border-color: #c7d2cb;
  background: #dbe4de;
  color: #34483d;
}

/* Green v5: stable navigation, stronger landing motion and one-screen workbench. */
body.home-page .alto-nav[data-site-shell-header] .alto-links > a::before {
  display: none !important;
}

body.home-page .alto-nav[data-site-shell-header] .alto-links > a {
  transition: color .2s ease, background .2s ease, transform .2s ease !important;
}

body.home-page .alto-nav[data-site-shell-header] .alto-links > a:hover {
  transform: translateY(-1px) !important;
}

.format-page[data-format-step="upload"] .format-step-nav {
  display: grid !important;
}

.landing-main {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.landing-main::before,
.landing-main::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.landing-main::before {
  top: 70px;
  left: -170px;
  width: 430px;
  height: 430px;
  background: radial-gradient(circle, rgba(105, 205, 143, .18), transparent 69%);
}

.landing-main::after {
  top: 360px;
  right: -160px;
  width: 370px;
  height: 370px;
  background: radial-gradient(circle, rgba(173, 232, 194, .22), transparent 70%);
}

.landing-actions {
  position: relative;
  isolation: isolate;
}

.landing-actions::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6px 8%;
  border-radius: 999px;
  background: rgba(83, 181, 119, .18);
  filter: blur(20px);
  pointer-events: none;
}

.flow-grid article > span {
  display: inline-block;
  transform-origin: left center;
  transition: transform .28s cubic-bezier(.16, 1, .3, 1), color .28s ease;
}

.flow-grid article:hover > span {
  color: #176641;
  transform: translateY(-3px) rotate(-5deg) scale(1.08);
}

@media (prefers-reduced-motion: no-preference) {
  .home-page.site-ready .chip-template { animation: chipTemplateFloat 5.6s ease-in-out infinite; }
  .home-page.site-ready .chip-preview { animation: chipPreviewFloat 6.2s ease-in-out infinite; }
  .home-page.site-ready .chip-format { animation: chipFormatFloat 5.9s .35s ease-in-out infinite; }
  .home-page.site-ready .chip-export { animation: chipExportFloat 6.5s .2s ease-in-out infinite; }
  .home-page.site-ready .landing-hero::after { animation: homeOrbit 11s ease-in-out infinite alternate; }
  .home-page.site-ready .hero-kicker span { animation: kickerSpark 4.8s ease-in-out infinite; }
  .home-page.site-ready .landing-actions::before { animation: actionGlow 3.8s ease-in-out infinite; }
  .home-page.site-ready .landing-main::before { animation: ambientDriftLeft 12s ease-in-out infinite alternate; }
  .home-page.site-ready .landing-main::after { animation: ambientDriftRight 14s ease-in-out infinite alternate; }
}

@keyframes chipTemplateFloat {
  0%, 100% { transform: translate3d(0, 2px, 0) rotate(-6deg); }
  50% { transform: translate3d(13px, -17px, 0) rotate(-2deg); }
}

@keyframes chipPreviewFloat {
  0%, 100% { transform: translate3d(0, -2px, 0) rotate(7deg); }
  50% { transform: translate3d(-14px, 16px, 0) rotate(3deg); }
}

@keyframes chipFormatFloat {
  0%, 100% { transform: translate3d(0, 3px, 0) rotate(-4deg); }
  50% { transform: translate3d(-11px, -16px, 0) rotate(1deg); }
}

@keyframes chipExportFloat {
  0%, 100% { transform: translate3d(0, -3px, 0) rotate(-6deg); }
  50% { transform: translate3d(12px, 17px, 0) rotate(-1deg); }
}

@keyframes homeOrbit {
  from { opacity: .55; transform: translateX(-50%) rotate(-4deg) scale(.97); }
  to { opacity: 1; transform: translateX(-50%) rotate(4deg) scale(1.045); }
}

@keyframes kickerSpark {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(16deg) scale(1.12); }
}

@keyframes actionGlow {
  0%, 100% { opacity: .45; transform: scale(.88); }
  50% { opacity: .9; transform: scale(1.12); }
}

@keyframes ambientDriftLeft {
  from { opacity: .6; transform: translate3d(-18px, 8px, 0) scale(.94); }
  to { opacity: 1; transform: translate3d(32px, -22px, 0) scale(1.08); }
}

@keyframes ambientDriftRight {
  from { opacity: .58; transform: translate3d(18px, -10px, 0) scale(.96); }
  to { opacity: .95; transform: translate3d(-34px, 26px, 0) scale(1.1); }
}

@media (min-width: 761px) {
  html.format-root {
    height: 100%;
    overflow: hidden;
  }

  body.format-page {
    width: 100%;
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 69.6px 54px minmax(0, 1fr) !important;
  }

  body.format-page > .alto-nav.format-tool-header[data-site-shell-header] {
    position: relative !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    top: auto !important;
  }

  body.format-page > .format-step-nav {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: min(calc(100% - 48px), 760px) !important;
    height: 54px !important;
    min-height: 54px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    align-self: center;
    justify-content: center !important;
  }

  body.format-page > .format-main,
  body.format-page[data-format-step="upload"] > .format-main,
  body.format-page[data-format-step="adjust"] > .format-main,
  body.format-page[data-format-step="export"] > .format-main {
    grid-column: 1 !important;
    grid-row: 3 !important;
    width: min(calc(100% - 48px), 1060px) !important;
    max-width: 1060px !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 10px 0 12px !important;
    overflow: hidden !important;
  }

  .format-page .format-stage {
    height: 100%;
    min-height: 0;
  }

  .format-page[data-format-step="upload"] [data-stage="upload"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 40px 188px minmax(150px, 1fr) 44px;
    grid-template-areas: none !important;
    gap: 10px;
  }

  .format-page[data-format-step="upload"] .upload-stage > .stage-intro,
  .format-page[data-format-step="upload"] .upload-stage > .upload-grid,
  .format-page[data-format-step="upload"] .upload-stage > .requirement-card,
  .format-page[data-format-step="upload"] .upload-stage > .stage-action {
    grid-area: auto !important;
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .format-page[data-format-step="upload"] .upload-stage > .stage-intro {
    height: 40px;
    margin: 0;
  }

  .format-page[data-format-step="upload"] .upload-stage > .stage-intro h2 {
    height: 40px;
    font-size: 27px;
    line-height: 40px;
    letter-spacing: .015em;
  }

  .format-page[data-format-step="upload"] .upload-stage > .stage-intro h2::before {
    width: 22px;
    height: 22px;
  }

  .format-page[data-format-step="upload"] .upload-grid,
  .format-page[data-format-step="upload"] .upload-stage > .upload-grid {
    width: min(100%, 592px);
    height: 188px;
    min-height: 0;
  }

  .format-page[data-format-step="upload"] .upload-grid .format-card {
    width: auto;
    height: 188px;
    min-height: 0;
    padding: 16px 18px;
  }

  .format-page[data-format-step="upload"] .upload-grid .file-drop,
  .format-page[data-format-step="upload"] .upload-grid .file-drop.compact,
  .format-page[data-format-step="upload"].has-selected-template .template-choice-card .file-drop {
    padding: 16px 18px;
  }

  .format-page[data-format-step="upload"] .upload-grid .card-title {
    top: 49%;
  }

  .format-page[data-format-step="upload"] .requirement-card {
    width: min(100%, 592px);
    height: 100%;
    min-height: 0;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .format-page[data-format-step="upload"] .requirement-card:not([open]) {
    height: auto;
    align-self: start;
  }

  .format-page[data-format-step="upload"] .requirement-card > summary {
    min-height: 42px;
    padding: 0 14px;
  }

  .format-page[data-format-step="upload"] .requirement-content {
    min-height: 0;
    padding: 10px 14px 12px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .format-page[data-format-step="upload"] .requirement-content .card-title h3 {
    font-size: 13px;
  }

  .format-page[data-format-step="upload"] .prompt-field {
    min-height: 0;
    height: 100%;
    margin-top: 7px;
  }

  .format-page[data-format-step="upload"] .prompt-field textarea {
    height: 100%;
    min-height: 72px;
    padding: 10px 12px 26px;
    resize: none;
  }

  .format-page[data-format-step="upload"] .stage-action {
    min-height: 44px;
    margin: 0;
  }

  .format-page[data-format-step="upload"] .stage-action .primary-button {
    height: 44px;
    min-height: 44px;
  }

  .format-page[data-format-step="adjust"] .adjust-stage,
  .format-page[data-format-step="export"] .export-stage {
    height: 100%;
    min-height: 0;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 44px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .format-page[data-format-step="adjust"] .stage-intro.with-actions,
  .format-page[data-format-step="export"] .stage-intro.with-actions {
    min-height: 44px;
    margin: 0;
    align-items: center;
  }

  .format-page[data-format-step="adjust"] .stage-intro h2,
  .format-page[data-format-step="export"] .stage-intro h2 {
    font-size: 26px;
  }

  .format-page[data-format-step="adjust"] .plan-pane {
    height: 100% !important;
    min-height: 0 !important;
  }

  .format-page[data-format-step="export"] .export-workbench {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .format-page[data-format-step="export"] .export-status-column,
  .format-page[data-format-step="export"] .export-facts,
  .format-page[data-format-step="export"] .export-action-card {
    min-height: 0;
    padding: 24px;
  }

  .format-page[data-format-step="export"] .export-status-column > span {
    margin-top: 22px;
  }

  .format-page[data-format-step="export"] .export-facts div {
    padding: 12px 0;
  }

  .format-page[data-format-step="export"] .export-action-card h3 {
    margin-top: 18px;
  }

  .format-page[data-format-step="export"] .privacy-note {
    margin: 16px 0 14px;
  }
}

@media (min-width: 761px) and (max-height: 680px) {
  .format-page[data-format-step="upload"] [data-stage="upload"] {
    grid-template-rows: 34px 164px minmax(126px, 1fr) 42px;
    gap: 7px;
  }

  .format-page[data-format-step="upload"] .upload-stage > .stage-intro,
  .format-page[data-format-step="upload"] .upload-stage > .stage-intro h2 {
    height: 34px;
    line-height: 34px;
  }

  .format-page[data-format-step="upload"] .upload-grid,
  .format-page[data-format-step="upload"] .upload-stage > .upload-grid,
  .format-page[data-format-step="upload"] .upload-grid .format-card {
    height: 164px;
  }
}

/* Original ALTO split hero */
.home-page .landing-hero.page-shell {
  width: min(100%, 1180px);
  height: 500px;
  min-height: 500px;
  margin-top: 0;
  padding: 32px 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr);
  align-items: center;
  gap: clamp(44px, 6vw, 84px);
  text-align: left;
}

.home-page .landing-hero::before {
  top: 50%;
  left: 37%;
  width: 540px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 211, 149, .2), rgba(195, 241, 211, .07) 52%, transparent 72%);
  filter: blur(2px);
  transform: translate(-50%, -50%);
}

.home-page .landing-hero::after { display: none; }

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.home-page .hero-kicker {
  width: fit-content;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  gap: 12px;
  background: transparent;
  box-shadow: none;
  color: #466253;
  font-size: 14px;
  font-weight: 680;
  letter-spacing: .04em;
}

.home-page .hero-kicker span {
  width: 42px;
  height: 1px;
  flex: 0 0 42px;
  background: #4aa271;
}

.home-page .landing-hero h1 {
  max-width: 640px;
  margin: 28px 0 0;
  color: #102c20;
  font-size: clamp(48px, 4.7vw, 68px);
  font-weight: 790;
  letter-spacing: -.058em;
  line-height: 1.08;
  white-space: normal;
  text-shadow: none;
}

.home-page .landing-hero h1 span {
  display: block;
  margin-bottom: 5px;
  color: #2f8d5a;
  font-size: .72em;
  font-weight: 760;
  letter-spacing: -.04em;
}

.home-page .landing-actions {
  width: auto;
  height: auto;
  margin-top: 38px;
  justify-content: flex-start;
  gap: 14px;
}

.home-page .landing-actions::before { display: none; }

.home-page .landing-actions .landing-primary,
.home-page .landing-actions .landing-secondary {
  height: 56px;
  min-height: 56px;
  padding: 0 30px;
  font-size: 15px;
  line-height: 22px;
}

.hero-visual {
  position: relative;
  width: 100%;
  height: 390px;
  margin: 0;
  isolation: isolate;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 28px -18px -18px 34px;
  z-index: -1;
  border: 1px solid rgba(94, 166, 120, .28);
  background: rgba(226, 247, 233, .56);
  clip-path: polygon(8% 0, 100% 0, 100% 84%, 84% 100%, 0 100%, 0 13%);
}

.hero-visual::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: 42px;
  width: 110px;
  height: 110px;
  z-index: -2;
  border-radius: 50%;
  background: rgba(139, 218, 168, .24);
}

.hero-visual-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: polygon(8% 0, 100% 0, 100% 84%, 84% 100%, 0 100%, 0 13%);
  background: #17392a;
  box-shadow: 0 32px 70px -40px rgba(18, 73, 44, .62);
}

.hero-visual-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 42, 29, .18), transparent 44%),
    linear-gradient(145deg, rgba(84, 178, 118, .12), rgba(7, 30, 21, .08));
  pointer-events: none;
}

.hero-visual-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 64% center;
  filter: saturate(.78) brightness(1.05) contrast(.94);
  transform: scale(1.035);
}

@media (prefers-reduced-motion: no-preference) {
  .home-page.site-ready .hero-copy { animation: altoHeroCopyIn .68s cubic-bezier(.16, 1, .3, 1) both; }
  .home-page.site-ready .hero-visual { animation: altoHeroVisualIn .78s .08s cubic-bezier(.16, 1, .3, 1) both; }
  .home-page.site-ready .hero-visual-image img { animation: altoMountainDrift 11s ease-in-out infinite alternate; }
  .home-page.site-ready .landing-hero::before { animation: altoHeroAura 9s ease-in-out infinite alternate; }
}

/* Upload role clarity: optional format basis versus required source paper. */
.format-page[data-format-step="upload"] .upload-grid .upload-kicker {
  color: #315e46;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
}

.format-page[data-format-step="upload"] .upload-grid .upload-kicker::after {
  content: "可选";
  top: 14px;
  right: 14px;
  width: auto;
  height: 24px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  border: 1px solid #c9ddd0;
  border-radius: 999px;
  background: #f4f9f6;
  color: #5f7769;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}

.format-page[data-format-step="upload"] .upload-grid .template-choice-card {
  border-style: dashed;
  border-color: #bfcfc5;
  background: #fbfdfc;
}

.format-page[data-format-step="upload"] .upload-grid .source-upload-card {
  border-style: solid;
  border-color: #4c8f69;
  background: linear-gradient(145deg, #f7fcf9, #edf8f1);
  box-shadow: inset 0 0 0 1px rgba(74, 143, 103, .08), 0 12px 30px rgba(33, 93, 59, .08);
}

.format-page[data-format-step="upload"] .upload-grid .source-upload-card .upload-kicker {
  color: #174d33;
}

.format-page[data-format-step="upload"] .upload-grid .source-upload-card .upload-kicker::after {
  content: "必传";
  border-color: #245f42;
  background: #245f42;
  color: #fff;
}

.format-page[data-format-step="upload"] .upload-grid .template-choice-card .file-drop strong {
  color: #3e5f4c;
}

.format-page[data-format-step="upload"] .upload-grid .source-upload-card .file-drop strong {
  color: #123f2a;
  font-size: 14px;
  font-weight: 850;
}

.format-page[data-format-step="upload"] .upload-grid .source-upload-card:has(.file-drop:hover),
.format-page[data-format-step="upload"] .upload-grid .source-upload-card:has(.file-drop:focus-visible),
.format-page[data-format-step="upload"] .upload-grid .source-upload-card:has(.file-drop.dragging) {
  border-color: #2f7650;
  background: linear-gradient(145deg, #f5fcf8, #e7f5ec);
  box-shadow: 0 0 0 4px rgba(54, 128, 83, .12), 0 16px 34px rgba(33, 93, 59, .1);
}

/* Final responsive identity rules: visitor ID must remain available on every phone layout. */
@media (max-width: 760px) {
  body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-shell {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
  }
  body.format-page .alto-nav.format-tool-header[data-site-shell-header] .nav-actions,
  .alto-nav[data-site-shell-header] .nav-actions { display: flex !important; }
  .alto-nav[data-site-shell-header] .nav-actions .nav-task { display: none !important; }
  .alto-nav[data-site-shell-header] .nav-user.nav-visitor { display: inline-flex !important; }
}

@media (max-width: 430px) {
  .alto-nav[data-site-shell-header] .nav-user.nav-visitor > span:last-child { display: none !important; }
  .alto-nav[data-site-shell-header] .nav-user.nav-visitor {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0 !important;
    justify-content: center;
  }
}

/* Green v8: restrained product-first hero. */
.home-page .landing-hero.page-shell {
  width: min(100%, 1180px);
  height: 460px;
  min-height: 460px;
  margin-top: 0;
  padding: 36px 44px;
  border: 1px solid rgba(194, 221, 204, .78);
  border-radius: 30px;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
  align-items: center;
  gap: 48px;
  overflow: hidden;
  background: rgba(246, 252, 248, .96);
  box-shadow: 0 24px 70px -54px rgba(22, 83, 50, .42);
  text-align: left;
}

.home-page .landing-hero::before,
.home-page .landing-hero::after { display: none; }

.home-page .hero-copy {
  max-width: none;
  padding: 0;
  margin: 0;
  text-align: left;
  animation: none !important;
}

.home-page .landing-hero h1 {
  max-width: 100%;
  margin: 0;
  color: #10281d;
  font-size: clamp(50px, 4.4vw, 60px);
  font-weight: 790;
  letter-spacing: -.058em;
  line-height: 1.08;
  white-space: normal;
  text-shadow: none;
  animation: none !important;
}

.home-page .landing-hero h1 span {
  display: block;
  margin: 0 0 12px;
  color: #31875a;
  font-size: .74em;
  font-weight: 760;
  letter-spacing: -.035em;
}

.home-page .landing-hero h1 strong {
  display: block;
  color: inherit;
  font-size: .9em;
  font-weight: inherit;
  white-space: nowrap;
}

.home-page .landing-actions {
  width: auto;
  height: auto;
  margin-top: 38px;
  justify-content: flex-start;
  gap: 14px;
  animation: none !important;
}

.home-page .landing-actions::before { display: none; }

.home-page .landing-actions .landing-primary,
.home-page .landing-actions .landing-secondary {
  width: auto;
  min-width: 128px;
  height: 54px;
  min-height: 54px;
  padding: 0 28px;
  font-size: 15px;
  line-height: 22px;
}

.home-page .hero-visual {
  position: relative;
  width: 100%;
  height: 360px;
  margin: 0;
  animation: none !important;
}

.home-page .hero-visual::before,
.home-page .hero-visual::after { display: none; }

.home-page .hero-visual-image {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(173, 207, 185, .92);
  border-radius: 22px;
  clip-path: none;
  background: #f8fbf9;
  box-shadow: 0 28px 60px -42px rgba(18, 68, 40, .48);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s ease;
}

.home-page .hero-visual-image::after { display: none; }

.home-page .hero-visual-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  filter: none;
  transform: none;
  animation: none !important;
}

.home-page .hero-visual:hover .hero-visual-image {
  transform: translateY(-3px);
  box-shadow: 0 34px 66px -42px rgba(18, 68, 40, .56);
}

@media (max-width: 980px) {
  .home-page .landing-hero.page-shell {
    height: 440px;
    min-height: 440px;
    padding: 34px;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
    gap: 32px;
  }

  .home-page .landing-hero h1 { font-size: clamp(44px, 5.2vw, 54px); }
  .home-page .hero-visual { height: 326px; }
}

@media (max-width: 760px) {
  .home-page .landing-hero.page-shell {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 32px 22px 24px;
    border-radius: 26px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .home-page .hero-copy { width: 100%; text-align: left; }
  .home-page .landing-hero h1 { font-size: clamp(38px, 10.5vw, 46px); }
  .home-page .landing-hero h1 span { margin-bottom: 8px; }
  .home-page .landing-hero h1 strong {
    font-size: clamp(30px, 8.45vw, 35px);
    letter-spacing: -.06em;
  }

  .home-page .landing-actions {
    width: 100%;
    margin-top: 28px;
    flex-direction: row;
  }

  .home-page .landing-actions .landing-primary,
  .home-page .landing-actions .landing-secondary {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 50px;
    min-height: 50px;
    padding: 0 14px;
  }

  .home-page .hero-visual { height: 246px; }
  .home-page .hero-visual-image { border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .hero-visual-image { transition: none; }
  .home-page .hero-visual:hover .hero-visual-image { transform: none; }
}

@keyframes altoHeroCopyIn {
  from { opacity: 0; transform: translate3d(-22px, 12px, 0); }
}

@keyframes altoHeroVisualIn {
  from { opacity: 0; transform: translate3d(26px, 18px, 0) scale(.97); }
}

@keyframes altoMountainDrift {
  from { transform: scale(1.035) translate3d(-4px, 0, 0); }
  to { transform: scale(1.075) translate3d(6px, -3px, 0); }
}

@keyframes altoHeroAura {
  from { opacity: .72; transform: translate(-50%, -50%) scale(.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
}

@media (max-width: 980px) {
  .home-page .landing-hero.page-shell {
    height: auto;
    min-height: 520px;
    padding: 42px 24px 30px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .84fr);
    gap: 34px;
  }

  .home-page .landing-hero h1 { font-size: clamp(42px, 6vw, 56px); }
  .hero-visual { height: 330px; }
}

@media (max-width: 760px) {
  .home-page .landing-hero.page-shell {
    width: 100%;
    min-height: 0;
    margin-top: 0;
    padding: 28px 0 14px;
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .home-page .landing-hero::before {
    top: 190px;
    left: 36%;
    width: 360px;
    height: 310px;
  }

  .home-page .hero-kicker { font-size: 12px; }
  .home-page .hero-kicker span { width: 30px; flex-basis: 30px; }
  .home-page .landing-hero h1 { margin-top: 20px; font-size: clamp(38px, 11vw, 50px); line-height: 1.1; }

  .home-page .landing-actions {
    width: 100%;
    margin-top: 28px;
    flex-direction: row;
    align-items: center;
  }

  .home-page .landing-actions .landing-primary,
  .home-page .landing-actions .landing-secondary {
    width: auto;
    min-width: 0;
    height: 50px;
    min-height: 50px;
    padding-inline: 22px;
  }

  .hero-visual { height: 280px; }
  .hero-visual::before { inset: 20px -10px -12px 24px; }
  .hero-visual::after { right: -24px; bottom: 30px; width: 86px; height: 86px; }
}

@media (max-width: 420px) {
  .home-page .landing-actions { align-items: stretch; }
  .home-page .landing-actions .landing-primary,
  .home-page .landing-actions .landing-secondary { flex: 1 1 0; padding-inline: 16px; }
  .hero-visual { height: 238px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .hero-copy,
  .home-page .hero-visual,
  .home-page .hero-visual-image img,
  .home-page .landing-hero::before { animation: none !important; }
}

/* Keep the split hero motion authoritative over legacy hero animation rules. */
@media (prefers-reduced-motion: no-preference) {
  .home-page.site-ready .hero-kicker,
  .home-page.site-ready .landing-hero h1,
  .home-page.site-ready .landing-actions,
  .home-page.site-ready .hero-kicker span { animation: none; }
  .home-page.site-ready .hero-copy { animation: altoHeroCopyIn .68s cubic-bezier(.16, 1, .3, 1) both; }
  .home-page.site-ready .hero-visual { animation: altoHeroVisualIn .78s .08s cubic-bezier(.16, 1, .3, 1) both; }
  .home-page.site-ready .hero-visual-image img { animation: altoMountainDrift 11s ease-in-out infinite alternate; }
  .home-page.site-ready .landing-hero::before { animation: altoHeroAura 9s ease-in-out infinite alternate; }
}
