@font-face {
  font-family: "Big Shoulders";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/bigshoulders-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/archivo-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/archivo-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plexmono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plexmono-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Big Shoulders";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/bigshoulders-latin-ext-800.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/archivo-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/archivo-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plexmono-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plexmono-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plexmono-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plexmono-cyrillic-600.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --surface: #eef5f6;
  --panel: #ffffff;
  --ink: #0f333b;
  --muted: #537078;
  --pool: #0b7d99;
  --pool-deep: #075e75;
  --band: #c8eaf1;
  --band-soft: #eaf6f8;
  --amber: #b45309;
  --amber-soft: #fdf3e7;
  --line: #d3e2e5;
  --line-strong: #9fb9be;
  --display: "Big Shoulders", "Archivo", sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--surface);
}

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background:
    linear-gradient(to bottom, rgba(11, 125, 153, 0.05), rgba(11, 125, 153, 0) 320px),
    var(--surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 30;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ---------- header ---------- */

.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 0 var(--band);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.bm-frame {
  fill: var(--band-soft);
  stroke: var(--pool-deep);
  stroke-width: 2;
}

.bm-wave {
  fill: none;
  stroke: var(--pool);
  stroke-width: 2;
  stroke-linecap: round;
}

.bm-wave-2 {
  stroke: var(--pool-deep);
}

.bm-salt {
  fill: var(--pool-deep);
}

.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.brand-name strong {
  color: var(--pool);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.header-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.lang-menu {
  position: relative;
}

.lang-menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary:hover {
  border-color: var(--pool);
}

.lang-caret {
  color: var(--muted);
}

.lang-list {
  position: absolute;
  right: 0;
  margin-top: 0.4rem;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px rgba(15, 51, 59, 0.18);
  list-style: none;
  padding: 0.35rem;
  min-width: 12.5rem;
  z-index: 20;
}

.lang-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
}

.lang-list a:hover,
.lang-list a.is-current {
  background: var(--band-soft);
  color: var(--pool-deep);
}

/* ---------- page ---------- */

.page-main {
  flex: 1;
  padding-block: 2.2rem 3rem;
}

.page-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  margin-bottom: 1.4rem;
}

.lede {
  max-width: 70ch;
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 1.6rem;
}

/* ---------- calculator panel ---------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--pool);
  box-shadow: 0 10px 24px rgba(15, 51, 59, 0.08);
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 2rem;
  padding: 1.8rem;
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.field input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 0;
  background: #fbfdfe;
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.field input::placeholder {
  color: #9db3b9;
  font-weight: 400;
  font-size: 0.95rem;
}

.field input:focus-visible {
  outline: 2px solid var(--pool);
  outline-offset: 1px;
  border-color: var(--pool);
}

.field select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 0;
  background: #fbfdfe;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.field select:focus-visible {
  outline: 2px solid var(--pool);
  outline-offset: 1px;
  border-color: var(--pool);
}

.calc-button {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  margin-top: 1.4rem;
  background: var(--pool);
  border: none;
  border-bottom: 3px solid var(--pool-deep);
  color: #fff;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.calc-button:hover {
  background: var(--pool-deep);
}

.calc-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.calc-button:active {
  transform: translateY(1px);
  border-bottom-width: 2px;
}

/* ---------- gauge + result ---------- */

.panel-readout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.gauge {
  background: var(--band-soft);
  border: 1px solid var(--line);
  padding: 0.9rem 0.9rem 0.5rem;
}

.gauge svg {
  display: block;
  width: 100%;
  height: auto;
}

.g-track {
  fill: #dbe9ec;
}

.g-band {
  fill: var(--band);
  stroke: var(--pool);
  stroke-width: 1;
}

.g-axis {
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.g-ticks line {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.g-ideal {
  stroke: var(--pool-deep);
  stroke-width: 2.5;
}

.g-num,
.g-nums text {
  font-family: var(--mono);
  font-size: 17px;
  fill: var(--muted);
}

.g-num-ideal {
  font-weight: 600;
  fill: var(--pool-deep);
  font-size: 19px;
}

.g-num-band {
  fill: var(--pool-deep);
}

.g-unit {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.g-marker {
  fill: var(--amber);
}

.g-marker-line {
  stroke: var(--amber);
  stroke-width: 2;
}

#gauge-marker {
  transition: transform 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  #gauge-marker {
    transition: none;
  }
}

#result {
  display: none;
  padding: 1rem 1.1rem;
  background: var(--band-soft);
  border-left: 4px solid var(--pool);
}

#result.show {
  display: block;
}

#result.result--above {
  background: var(--amber-soft);
  border-left-color: var(--amber);
}

.result1 {
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.result2 {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}

/* ---------- guide ---------- */

.guide {
  margin-top: 2.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.guide-block {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  padding: 1.8rem;
}

.guide-block h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}

.guide-answer {
  max-width: 72ch;
  margin-bottom: 0.9rem;
}

.guide-block p {
  max-width: 72ch;
}

.guide-block p + p {
  margin-top: 0.7rem;
}

.guide-list {
  margin: 0.4rem 0 0.9rem 1.2rem;
  max-width: 70ch;
}

.guide-list li {
  margin-bottom: 0.35rem;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 0.6rem;
}

.guide-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.92rem;
}

.guide-table th,
.guide-table td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.7rem;
  text-align: left;
}

.guide-table thead th {
  background: var(--band-soft);
  font-weight: 600;
  color: var(--pool-deep);
}

.guide-table tbody th {
  font-family: var(--mono);
  font-weight: 600;
  white-space: nowrap;
}

.guide-table td {
  font-family: var(--mono);
}

.verdict-yes {
  color: var(--pool-deep);
  font-weight: 600;
}

.verdict-no {
  color: var(--amber);
  font-weight: 600;
}

.guide-footnote {
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- faq ---------- */

.faq-container {
  margin-top: 2.6rem;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  padding: 1.8rem;
}

.faq-container h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.5rem;
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-item summary {
  list-style: none;
  padding: 0.9rem 2.2rem 0.9rem 0.2rem;
  cursor: pointer;
  position: relative;
}

.accordion-item summary::-webkit-details-marker {
  display: none;
}

.accordion-item h3 {
  display: inline;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.02rem;
}

.accordion-item summary:after {
  content: '+';
  font-family: var(--mono);
  font-weight: 600;
  color: var(--pool);
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
}

.accordion-item[open] summary:after {
  content: '−';
}

.accordion-item summary:hover h3 {
  color: var(--pool-deep);
}

.accordion-item summary:focus-visible {
  outline: 2px solid var(--pool);
  outline-offset: -2px;
}

.accordion-content {
  padding: 0 0.2rem 1rem;
}

.accordion-content p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 70ch;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  margin-top: 3rem;
}

.footer-block {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  justify-content: space-between;
  padding-block: 1rem;
}

.footer-brand {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.noscript-message {
  background: var(--amber-soft);
  color: var(--ink);
  border: 1px solid var(--amber);
  padding: 1rem;
  margin: 1rem auto;
  max-width: 520px;
  text-align: center;
}

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .panel-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 1.2rem;
  }

  .header-note {
    display: none;
  }

  .faq-container,
  .guide-block {
    padding: 1.2rem;
  }

  .page-main {
    padding-block: 1.5rem 2rem;
  }
}
