:root {
  --ink: #092b31;
  --ink-soft: #42636a;
  --deep: #0b3439;
  --deep-2: #124a4d;
  --water: #82d8d0;
  --water-pale: #dff7ed;
  --sand: #eab873;
  --sand-pale: #fff1d2;
  --paper: #f5f2e9;
  --paper-2: #fbfaf5;
  --line: rgba(9, 43, 49, 0.17);
  --danger: #b84336;
  --shadow: 0 22px 55px rgba(7, 43, 47, 0.12);
  color-scheme: light;
  font-family: "Avenir Next", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.55rem 0.8rem;
  border-radius: 0.5rem;
  background: var(--sand-pale);
  color: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--deep);
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.brand-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid var(--deep);
  border-radius: 50%;
  box-shadow: 0.28rem 0.28rem 0 -0.04rem var(--sand);
}

.header-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  min-height: 480px;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--deep);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4.5rem);
  color: #f8f6e8;
  background: linear-gradient(110deg, rgba(11, 52, 57, 0.99) 0%, rgba(11, 52, 57, 0.95) 68%, rgba(11, 52, 57, 0.45) 100%);
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--sand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.hero h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.hero h1 em {
  color: var(--water);
  font-style: normal;
}

.hero-lead {
  max-width: 34rem;
  margin: 1.55rem 0 0;
  color: #c9e4dd;
  font-size: 1.05rem;
  line-height: 1.9;
}

.jump-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 235px);
  min-height: 48px;
  margin-top: 2rem;
  padding: 0.6rem 0.9rem 0.6rem 1.1rem;
  border: 1px solid rgba(226, 249, 233, 0.34);
  border-radius: 99px;
  color: #f8f6e8;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.jump-link span {
  color: var(--sand);
  font-size: 1.2rem;
}

.jump-link:hover {
  border-color: var(--water);
  background: rgba(130, 216, 208, 0.13);
}

.hero-footnote {
  margin: 1.1rem 0 0;
  color: #8eb9b2;
  font-size: 0.76rem;
}

.hero-art {
  position: relative;
  min-height: 480px;
  margin: 0;
  overflow: hidden;
  background: #08282d;
}

.hero-art picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-art::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 52, 57, 0.7), transparent 50%), linear-gradient(0deg, rgba(11, 52, 57, 0.35), transparent 30%);
  content: "";
  pointer-events: none;
}

.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
  object-position: 58% center;
}

.hero-art figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 1;
  max-width: 23ch;
  color: #e8f2dc;
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: right;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0 4.2rem;
  border-bottom: 1px solid var(--line);
}

.intro-strip > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.75rem;
  padding: 1.1rem 1.2rem 1.2rem 0;
}

.intro-strip > div + div {
  padding-left: 1.2rem;
  border-left: 1px solid var(--line);
}

.strip-number {
  grid-row: span 2;
  color: var(--deep-2);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.intro-strip strong {
  font-size: 0.92rem;
}

.intro-strip p {
  margin: 0.12rem 0 0;
  color: var(--ink-soft);
  font-size: 0.79rem;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: clamp(2rem, 6vw, 5.4rem);
  align-items: start;
  padding-bottom: 4.5rem;
}

.section-heading h2,
.result-heading h2 {
  margin: 0;
  color: var(--deep);
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.section-heading > p:last-child {
  margin: 0.8rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.calculator-form {
  margin-top: 2rem;
}

.calculator-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 1.5rem 0 1.65rem;
  border: 0;
  border-top: 1px solid var(--line);
}

.calculator-form legend {
  padding: 0;
  color: var(--deep);
  font-size: 0.98rem;
  font-weight: 800;
}

.shape-fieldset {
  border-top: 0 !important;
  padding-top: 0 !important;
}

.shape-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 350px;
  margin-top: 0.85rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.42);
}

.shape-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 0.55rem;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.shape-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.shape-option:has(input:checked) {
  background: var(--deep);
  color: #f8f6e8;
  box-shadow: 0 4px 10px rgba(9, 43, 49, 0.16);
}

.shape-option:has(input:focus-visible) {
  outline: 3px solid rgba(37, 132, 128, 0.43);
  outline-offset: 2px;
}

.field-help,
.diagram-note {
  margin: 0.38rem 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.55;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem 1rem;
  margin-top: 1.15rem;
}

.field {
  min-width: 0;
}

.field[hidden] {
  display: none;
}

.field label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin-bottom: 0.42rem;
  color: var(--deep);
  font-size: 0.86rem;
  font-weight: 800;
}

.unit {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
}

.optional {
  color: var(--deep-2);
  font-size: 0.67rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(9, 43, 49, 0.28);
  border-radius: 0.6rem;
  outline: 0;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field input:hover {
  border-color: rgba(9, 43, 49, 0.52);
}

.field input:focus-visible {
  border-color: var(--deep-2);
  box-shadow: 0 0 0 4px rgba(130, 216, 208, 0.36);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
  background: #fff7f4;
}

.field-error {
  margin: 0.35rem 0 0;
  color: var(--danger);
  font-size: 0.75rem;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem 1.15rem;
  padding-top: 1.3rem;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 46px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.primary-button {
  min-width: 170px;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--deep);
  background: var(--deep);
  color: #f8f6e8;
  transition: background-color 180ms ease, transform 180ms ease;
}

.primary-button span {
  margin-left: 1rem;
  color: var(--sand);
  font-size: 1.05rem;
}

.primary-button:hover {
  background: var(--deep-2);
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.text-button {
  padding: 0.6rem 0.1rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.secondary-button {
  padding: 0.6rem 1rem;
  border: 1px solid rgba(9, 43, 49, 0.28);
  background: transparent;
  color: var(--deep);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.secondary-button:hover {
  border-color: var(--deep-2);
  background: var(--water-pale);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(37, 132, 128, 0.5);
  outline-offset: 3px;
}

.error-summary {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--danger);
  border-radius: 0.35rem;
  background: #fff3ef;
  color: #762a24;
}

.error-summary p {
  margin: 0;
  font-weight: 800;
}

.error-summary ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.error-summary li {
  margin-top: 0.12rem;
  font-size: 0.82rem;
}

.visual-column {
  position: sticky;
  top: 1.2rem;
}

.diagram-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 1.25rem;
  background: var(--deep);
  color: #f8f6e8;
  box-shadow: 0 18px 45px rgba(7, 43, 47, 0.15);
}

.card-kicker {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--water);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.card-index {
  color: var(--sand);
}

.diagram-card h2 {
  max-width: 14ch;
  margin: 0.9rem 0 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.diagram-note {
  color: #acd7cf;
}

.tank-diagram {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 1.35rem;
}

.measure-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: #c2dcd4;
  font-size: 0.76rem;
}

.measure-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 0.18rem;
}

.water-swatch {
  background: var(--water);
}

.sand-swatch {
  background: var(--sand);
}

.tip-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(9, 43, 49, 0.15);
  border-radius: 0.9rem;
  background: var(--sand-pale);
}

.tip-mark {
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--sand);
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.tip-card strong {
  color: var(--deep);
  font-size: 0.82rem;
}

.tip-card p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.55;
}

.result-section {
  margin-bottom: 4.5rem;
  padding: clamp(1.25rem, 4vw, 2.6rem);
  border-radius: 1.25rem;
  background: var(--water-pale);
}

.result-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid rgba(9, 43, 49, 0.15);
}

.result-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.79rem;
}

.result-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(230px, 0.8fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.result-water-card,
.result-detail-card {
  border-radius: 1rem;
}

.result-water-card {
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--deep);
  color: #f8f6e8;
}

.result-label {
  display: block;
  color: var(--water);
  font-size: 0.84rem;
  font-weight: 800;
}

.result-water-card strong {
  display: inline-block;
  margin-top: 0.35rem;
  color: #f8f6e8;
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

.result-unit {
  margin-left: 0.45rem;
  color: var(--sand);
  font-size: 1.2rem;
  font-weight: 800;
}

.result-water-card p {
  margin: 0.65rem 0 0;
  color: #b9d9d2;
  font-size: 0.9rem;
}

.result-detail-card {
  padding: 0.4rem 1.2rem;
  background: rgba(255, 255, 255, 0.65);
}

.detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(9, 43, 49, 0.12);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-row span {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.detail-row strong {
  color: var(--deep);
  font-size: 1rem;
  white-space: nowrap;
}

.result-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.result-formula,
#result-formula {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.79rem;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.service-notes {
  margin: 0 0 4.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.6rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--line);
}

.notes-grid article {
  min-width: 0;
  padding: 1.25rem;
  background: var(--paper-2);
}

.notes-grid strong {
  color: var(--deep);
  font-size: 0.86rem;
}

.notes-grid p {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  font-size: 0.77rem;
  line-height: 1.7;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.site-footer p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 410px;
    padding-bottom: 2.8rem;
    background: linear-gradient(110deg, rgba(11, 52, 57, 0.97), rgba(11, 52, 57, 0.68));
  }

  .hero-art {
    position: absolute;
    inset: 0;
    min-height: 100%;
    opacity: 0.7;
  }

  .hero-art img {
    min-height: 100%;
  }

  .hero-art figcaption {
    display: none;
  }

  .calculator-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .visual-column {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.68fr);
    align-items: start;
    gap: 1rem;
  }
}

@media (max-width: 650px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 560px);
  }

  .site-header {
    min-height: 65px;
  }

  .header-note {
    display: none;
  }

  .hero {
    border-radius: 1rem;
  }

  .hero-copy {
    min-height: 490px;
    padding: 2.1rem 1.25rem;
  }

  .hero h1 {
    font-size: clamp(2.65rem, 12vw, 4rem);
  }

  .intro-strip {
    grid-template-columns: 1fr;
    margin-bottom: 3.2rem;
  }

  .intro-strip > div,
  .intro-strip > div + div {
    padding: 0.9rem 0;
    border-left: 0;
  }

  .intro-strip > div + div {
    border-top: 1px solid var(--line);
  }

  .input-grid,
  .result-main-grid,
  .visual-column,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .result-heading,
  .result-foot,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-actions {
    justify-content: flex-start;
  }

  .secondary-button {
    flex: 1 1 150px;
  }
}

@media (max-width: 360px) {
  .site-header,
  main,
  .site-footer {
    width: calc(100% - 20px);
  }

  .hero-copy {
    padding-inline: 1rem;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .result-section,
  .diagram-card {
    padding-inline: 1rem;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .site-header,
  .hero,
  .intro-strip,
  .visual-column,
  .form-actions,
  .result-actions,
  .site-footer,
  .service-notes,
  .skip-link {
    display: none !important;
  }

  main,
  .site-header,
  .site-footer {
    width: 100%;
  }

  .calculator-layout {
    display: block;
    padding: 0;
  }

  .section-heading {
    margin-bottom: 1rem;
  }

  .calculator-form {
    margin-top: 0;
  }

  .calculator-form fieldset {
    padding-block: 0.8rem;
  }

  .field input {
    min-height: 32px;
    padding: 0.2rem 0.45rem;
    border: 1px solid #999;
    background: #fff;
  }

  .result-section[hidden] {
    display: none !important;
  }

  .result-section:not([hidden]) {
    display: block;
    margin: 1rem 0 0;
    padding: 1rem;
    border: 1px solid #aaa;
    background: #fff;
    break-inside: avoid;
  }

  .result-main-grid {
    grid-template-columns: 1fr 1fr;
  }

  .result-water-card {
    background: #eef7f4;
    color: #111;
  }

  .result-water-card strong,
  .result-label,
  .detail-row strong,
  .result-heading h2 {
    color: #111;
  }

  .result-water-card p,
  .result-status,
  .result-formula,
  .detail-row span {
    color: #333;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* SOU100 Stage A batch-06 */
.hero-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin: .75rem 0 .6rem; padding-left: 1.25rem; }
.hero-steps li { min-width: 0; padding-left: .08rem; font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; }
.hero-cta { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; margin: .1rem 0 .3rem; padding: .55rem .9rem; border: 1px solid #82d8d0; border-radius: 999px; color: #f8f6e8; background: rgba(8, 40, 45, .55); font-weight: 800; text-decoration: none; }
.hero-cta:focus-visible { outline: 3px solid #eab873; outline-offset: 3px; }
.hero-cta span { color: var(--sand); font-size: 1.05rem; line-height: 1; }
.hero { min-height: 0; }
.hero-copy { padding: clamp(1.35rem, 3vw, 2.1rem); }
.hero h1 { max-width: none; font-size: clamp(2rem, 4.3vw, 3.7rem); line-height: 1.04; word-break: auto-phrase; }
.hero-lead { margin-top: .75rem; font-size: .96rem; line-height: 1.55; }
.hero-art, .hero-art img { min-height: 320px; }
.intro-strip { margin: .65rem 0 1.1rem; }
.intro-strip > div { padding-block: .7rem; }
.calculator-form { margin-top: 1rem; }
@media (max-width: 640px) {
  .hero { border-radius: 1rem; }
  .hero-art { display: none; }
  .hero-copy { padding: 1.2rem; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.75rem); }
  .hero-lead { margin-top: .4rem; font-size: .91rem; line-height: 1.5; }
  .hero-steps { gap: .25rem; margin: .5rem 0; }
  .hero-steps li { font-size: .72rem; }
  .hero-footnote { margin-top: .2rem; font-size: .69rem; }
  .intro-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: .4rem 0 .65rem; }
  .intro-strip > div { grid-template-columns: 1fr; gap: .15rem; padding: .45rem .35rem; }
  .intro-strip > div + div { padding-left: .35rem; }
  .intro-strip p { font-size: .65rem; line-height: 1.35; }
  .intro-strip strong { font-size: .75rem; }
  .calculator-layout .section-heading .eyebrow { display: none; }
  .calculator-layout .section-heading > p:last-child { margin-top: .35rem; font-size: .82rem; }
  .calculator-layout .section-heading h2 { font-size: 1.4rem; }
  .calculator-form { margin-top: .6rem; }
}


/* SOU100 Stage A batch-06 measured bound adjustment */
@media (min-width: 641px) {
  .hero-art { height: 400px; min-height: 0; }
  .hero-art picture, .hero-art img { height: 100%; min-height: 0; }
  .hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
  .hero-copy { padding: clamp(1.2rem, 2.5vw, 2rem); }
}
@media (max-width: 640px) {
  .hero-copy { min-height: 0; }
  .calculator-form fieldset { padding-top: .5rem; }
}
