:root {
  --ink: #3e3233;
  --plum: #665056;
  --mauve: #9a8185;
  --blush: #c7a9a3;
  --sand: #e2cdbe;
  --cream: #f3e8df;
  --paper: #fcf9f6;
  --white: #fff;
  --muted: #6e5d60;
  --line: #ddcec7;
  --error: #982e37;
  --radius: 22px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.65 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.7rem);
  font-weight: 650;
}
h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 630;
}
h3 {
  font-size: 1.12rem;
  font-weight: 650;
}
a {
  color: inherit;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--plum);
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
button,
input,
textarea {
  border-radius: 10px;
}
button {
  line-height: 1.4;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 4px;
}
::selection {
  background: var(--sand);
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
.container {
  width: min(1180px, calc(100% - 64px));
  margin-inline: auto;
}
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.brand-sub {
  display: block;
  font-size: 0.81rem;
  font-weight: 450;
  letter-spacing: 0.06em;
  margin-top: 3px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--cream);
  background: var(--ink);
  border-radius: 13px;
  font:
    700 35px/1 Georgia,
    serif;
  transform: rotate(-7deg);
}
.brand-mark span:last-child {
  transform: translateY(-5px);
}
.header-inner nav {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 0.87rem;
  font-weight: 550;
}
.header-inner nav a {
  text-decoration: none;
  padding: 12px 0;
}
.header-inner nav [aria-current='page'] {
  border-bottom: 2px solid var(--ink);
}
.header-inner nav a:last-child {
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 100px;
}
.install-banner {
  background: var(--ink);
  color: var(--paper);
}
.install-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
}
.install-banner-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
}
.install-banner-copy {
  color: #e8dcd7;
  font-size: 0.76rem;
  line-height: 1.4;
  margin-top: 3px;
}
.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.install-button {
  min-height: 38px;
  padding: 8px 15px;
  background: var(--paper);
  color: var(--ink);
}
.install-button:hover {
  background: var(--cream);
  color: var(--ink);
}
.install-dismiss {
  border: 0;
  background: transparent;
  color: #e8dcd7;
  font-size: 0.72rem;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.install-dismiss:hover {
  color: var(--white);
}
.overline {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--plum);
}
.status-dot {
  display: inline-block;
  background: var(--mauve);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 7px;
}
.tool-top {
  background: linear-gradient(130deg, var(--cream), #f7f0ea 65%, #ede0da);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 24px;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}
.hero h1 {
  margin: 12px 0;
}
.hero h1 span {
  font-weight: 380;
  color: var(--plum);
}
.hero-description {
  font-size: 1.1rem;
  font-weight: 500;
}
.hero-support {
  margin-top: 5px;
  font-size: 0.87rem;
  color: var(--muted);
}
.related-top {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  padding-left: 24px;
  border-left: 1px solid #c4afa8;
}
.related-top strong {
  color: var(--ink);
  font-size: 0.9rem;
}
.related-top strong span {
  margin-left: 15px;
}
.calculator {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: var(--white);
  border: 1px solid #d8c6bf;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 48px #3e323308;
}
.calculator-input {
  padding: 30px 36px;
  min-width: 0;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}
.workspace-heading h2 {
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}
.small-tag {
  font:
    500 0.72rem/1.4 ui-monospace,
    monospace;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: nowrap;
}
.helper,
.muted {
  color: var(--muted);
}
.helper {
  font-size: 0.78rem;
  line-height: 1.55;
}
.ratio-inputs,
.point-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  gap: 15px;
  margin: 24px 0;
}
.point-inputs {
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
legend {
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0;
  margin-bottom: 10px;
}
.field {
  min-width: 0;
}
.field label,
.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.76rem;
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  min-width: 0;
  height: 54px;
  border: 1px solid #ad9795;
  background: #fffdfb;
  padding: 10px 13px;
  font:
    500 1.12rem/1.2 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.field input::placeholder {
  font:
    400 0.83rem/1.2 system-ui,
    sans-serif;
  color: #76666a;
}
.field input:focus {
  background: #fff;
}
.fraction-line {
  height: 2px;
  background: var(--blush);
  margin: 12px 0;
}
.equals {
  align-self: center;
  font:
    400 30px Georgia,
    serif;
  margin-top: 12px;
  text-align: center;
}
.point-inputs .field + .field {
  margin-top: 15px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 46px;
  padding: 12px 20px;
  font-size: 0.81rem;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background 0.16s,
    border-color 0.16s;
}
.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.primary:hover {
  background: var(--plum);
  color: #fff;
}
.secondary {
  background: #fff;
  border-color: var(--line);
}
.secondary:hover,
.chip:hover {
  background: var(--cream);
}
.text-button {
  background: transparent;
  border: 0;
  padding: 10px 3px;
  font-size: 0.73rem;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.sample-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid #eee5df;
  margin-top: 23px;
  padding-top: 18px;
}
.sample-row > span {
  font-size: 0.7rem;
  color: var(--muted);
  margin-right: 4px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 100px;
  padding: 7px 11px;
  font-size: 0.69rem;
  min-height: 36px;
}
.result-panel {
  min-width: 0;
  padding: 30px 34px;
  background: #f0e5df;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.result-panel > .helper:empty {
  display: none;
}
.result-panel h2 {
  font-size: 1.5rem;
  margin: 10px 0;
}
.result-panel p {
  font-size: 0.85rem;
  max-width: 44ch;
}
.empty-equation {
  display: flex;
  align-items: center;
  gap: 22px;
  font:
    italic 38px/1.2 Georgia,
    serif;
  color: var(--plum);
  margin: 26px 0;
}
.fraction {
  display: inline-flex;
  flex-direction: column;
  text-align: center;
  min-width: 38px;
}
.fraction span:first-child {
  padding: 0 12px 5px;
  border-bottom: 1px solid var(--mauve);
}
.fraction span:last-child {
  padding: 5px 12px 0;
}
.fraction:last-child span:last-child {
  color: var(--ink);
  background: var(--sand);
  border-radius: 0 0 7px 7px;
}
.result-promise {
  display: block;
  border-top: 1px solid #d9c6bf;
  padding-top: 16px;
  margin-top: 24px;
  font-size: 0.71rem;
  color: var(--muted);
}
.result-value {
  font-size: clamp(1.8rem, 3.5vw, 2.9rem);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  margin: 12px 0;
}
.result-value.special {
  font-size: 1.75rem;
}
.result-panel .exact-result {
  font:
    500 0.8rem/1.7 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
  margin: 12px 0;
}
.result-panel .result-steps {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #d5bfb7;
}
.result-steps h3 {
  font-size: 0.82rem;
}
.result-steps ol {
  padding-left: 19px;
  font-size: 0.78rem;
  line-height: 1.7;
  margin-bottom: 0;
  overflow-wrap: anywhere;
}
.result-steps li + li {
  margin-top: 8px;
}
.copy-button {
  background: transparent;
  border-color: #bfa49f;
  font-size: 0.74rem;
  min-height: 40px;
  margin-top: 20px;
  padding: 8px 15px;
  border-radius: 100px;
}
.copy-button:hover {
  background: var(--sand);
}
#copy-fallback {
  width: 100%;
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--mauve);
  font-size: 0.8rem;
}
#copy-label {
  font-size: 0.75rem;
  margin-top: 15px;
}
.result-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 14px 0;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.result-metrics span {
  background: #fff8;
  padding: 6px 10px;
  border-radius: 7px;
  max-width: 100%;
}
.tool-notes {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 21px;
  font-size: 0.7rem;
  color: var(--muted);
}
.tool-notes span span {
  margin-right: 5px;
}
.tool-notes a {
  text-decoration: none;
}
.field-error {
  font-size: 0.72rem;
  color: var(--error);
  line-height: 1.5;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.field-error:empty {
  display: none;
}
[aria-invalid='true'] {
  border-color: var(--error) !important;
  outline-color: var(--error);
}
.form-error {
  padding: 12px;
  background: #fff0ef;
  border: 1px solid #dca6ab;
  border-radius: 8px;
  color: var(--error);
  font-size: 0.8rem;
  margin-bottom: 15px;
}
.learning-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 80px;
  padding-top: 68px;
  padding-bottom: 75px;
}
.contents {
  align-self: start;
  position: sticky;
  top: 28px;
}
.contents > .overline {
  max-width: 180px;
  line-height: 1.7;
}
.contents h2 {
  font-size: 1.15rem;
  margin: 10px 0 24px;
}
.contents nav {
  display: flex;
  flex-direction: column;
}
.contents nav a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 0.72rem;
  text-decoration: none;
  line-height: 1.5;
  padding: 10px 0;
  border-bottom: 1px solid #e8ddd6;
}
.contents nav a span {
  font-size: 0.63rem;
  color: var(--muted);
}
.contents a:hover {
  font-weight: 650;
}
.learn-section {
  padding-bottom: 42px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 30px;
}
.section-number {
  font-size: 0.61rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.learn-section h2 {
  margin: 12px 0 21px;
}
.learn-section p,
.prose p {
  margin: 14px 0;
  font-size: 0.94rem;
  color: #5e5052;
}
.learn-section h3,
.prose h3 {
  margin-top: 24px;
  margin-bottom: 10px;
}
.learn-section li,
.prose li {
  font-size: 0.94rem;
  color: #5e5052;
}
.guide-steps {
  padding-left: 25px;
}
.guide-steps li,
.check-list li {
  padding-left: 7px;
  margin-bottom: 14px;
}
.formula-block {
  padding: 26px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  font:
    500 clamp(1.05rem, 2.4vw, 1.5rem)/1.6 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
  text-align: center;
}
.small-formula {
  font-size: 0.9rem;
  color: var(--muted);
}
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 25px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8rem;
  text-align: left;
}
caption {
  padding: 13px 16px;
  text-align: left;
  color: var(--muted);
  font-size: 0.72rem;
  background: var(--cream);
}
th,
td {
  padding: 13px 15px;
  border-top: 1px solid var(--line);
}
th {
  font-weight: 600;
}
thead {
  background: #f8f2ed;
}
td {
  color: #5e5052;
}
tr:last-child td {
  border-bottom: 0;
}
.example-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.example {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.example .overline {
  font-size: 0.6rem;
}
.example h3 {
  margin-top: 10px;
}
.example p {
  font-size: 0.83rem;
  line-height: 1.75;
  margin-bottom: 0;
}
.note {
  padding: 20px 23px;
  background: var(--cream);
  border-left: 3px solid var(--mauve);
  border-radius: 0 10px 10px 0;
  font-size: 0.85rem;
  margin: 24px 0;
  line-height: 1.8;
}
.slope-symbol {
  font-size: 30px;
  color: var(--plum);
}
.faqs {
  border-top: 1px solid var(--line);
}
details {
  border-bottom: 1px solid var(--line);
  padding: 0;
}
summary {
  cursor: pointer;
  font-size: 0.91rem;
  font-weight: 600;
  padding: 19px 25px 19px 0;
  line-height: 1.5;
}
details p {
  padding: 0 12px 12px 0;
}
.related-card {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  background: var(--sand);
  border-radius: var(--radius);
  padding: 32px;
}
.related-card h2 {
  margin: 10px 0 15px;
  font-size: 1.6rem;
  max-width: 24ch;
}
.related-card p {
  font-size: 0.88rem;
  max-width: 40ch;
  margin-bottom: 22px;
}
.related-art {
  font:
    400 100px Georgia,
    serif;
  color: var(--plum);
  padding-right: 10px;
}
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 50px 0 20px;
}
.footer-main {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 35px;
}
.site-footer .brand-mark {
  background: var(--sand);
  color: var(--ink);
}
.site-footer a:hover {
  color: #fff;
}
.footer-main h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 6px 0 18px;
}
.footer-main > div > a:not(.brand) {
  display: block;
  font-size: 0.76rem;
  text-decoration: none;
  color: #e3d2ca;
  margin: 10px 0;
}
.footer-main > div > p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 22px 0;
}
.footer-tag {
  font-size: 0.64rem;
  color: #d5c2ba;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 0.65rem;
  color: #d5c2ba;
  border-top: 1px solid #665356;
  padding-top: 20px;
  margin-top: 40px;
}
.breadcrumbs {
  padding-top: 22px;
  font-size: 0.7rem;
  color: var(--muted);
}
.breadcrumbs nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  text-decoration: none;
}
.info-page {
  max-width: 850px;
  padding-top: 46px;
  padding-bottom: 80px;
}
.info-hero {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 35px;
}
.info-hero h1 {
  margin: 12px 0 20px;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
}
.info-hero > p:last-child {
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 48ch;
}
.prose h2 {
  font-size: 1.4rem;
  margin: 36px 0 16px;
}
.prose .policy-date {
  font-size: 0.75rem;
}
.contact-page {
  max-width: 1180px;
}
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 70px;
}
.contact-layout aside h2 {
  font-size: 1.7rem;
  max-width: 18ch;
  margin-top: 15px;
}
.contact-layout aside > a,
.contact-layout p a {
  overflow-wrap: anywhere;
}
.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-form h2 {
  margin-top: 0;
}
.contact-form label {
  margin-top: 18px;
  font-size: 0.82rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #ad9795;
  background: #fffdfb;
  padding: 12px;
  min-height: 48px;
  resize: vertical;
}
.contact-form .helper {
  font-size: 0.75rem;
}
.contact-form button {
  margin-top: 10px;
}
.contact-form #contact-status {
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.contact-form #contact-status:empty {
  margin: 0;
}
.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
}
.skip-link:focus {
  transform: translateY(0);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.not-found {
  text-align: center;
  padding: 90px 0;
}
.not-found p {
  margin: 20px 0;
}
.slope-sketch {
  width: 100%;
  max-width: 240px;
  height: 70px;
  margin-top: 14px;
}
.sketch-caption {
  font-size: 0.65rem !important;
  color: var(--muted);
}
@media (min-width: 1500px) {
  .tool-top {
    padding-top: 50px;
  }
  .hero {
    margin-bottom: 35px;
  }
}
@media (max-width: 1050px) {
  .container {
    width: calc(100% - 40px);
  }
  .learning-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 40px;
  }
  .calculator-input,
  .result-panel {
    padding: 26px;
  }
  .header-inner nav {
    gap: 20px;
  }
  .related-top {
    display: none;
  }
  .contact-layout {
    gap: 35px;
  }
}
@media (max-width: 760px) {
  .install-banner-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
    padding: 14px 0;
  }
  .install-banner-actions {
    width: 100%;
    justify-content: space-between;
  }
  .header-inner {
    min-height: 80px;
    gap: 14px;
  }
  .brand {
    font-size: 0.95rem;
    gap: 8px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 29px;
    border-radius: 10px;
  }
  .brand-sub {
    font-size: 0.67rem;
  }
  .header-inner nav {
    gap: 15px;
    font-size: 0.75rem;
  }
  .nav-extra {
    display: none;
  }
  .header-inner nav a:last-child {
    padding: 8px 10px;
  }
  .tool-top {
    padding-top: 27px;
  }
  .hero {
    margin-bottom: 24px;
  }
  .hero .overline {
    font-size: 0.59rem;
  }
  .hero-description {
    font-size: 1rem;
  }
  .hero-support {
    font-size: 0.78rem;
    max-width: 44ch;
  }
  .hero h1 {
    margin: 11px 0;
  }
  .calculator {
    grid-template-columns: 1fr;
  }
  .result-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    min-height: 280px;
  }
  .calculator-input {
    padding: 24px;
  }
  .tool-notes {
    flex-wrap: wrap;
    font-size: 0.65rem;
    gap: 8px 16px;
  }
  .learning-layout {
    display: block;
    padding-top: 35px;
  }
  .contents {
    position: static;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--line);
  }
  .contents > .overline {
    max-width: none;
  }
  .contents h2 {
    margin-bottom: 12px;
  }
  .contents nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 25px;
  }
  .contents nav a {
    font-size: 0.69rem;
  }
  .section-number {
    font-size: 0.58rem;
  }
  .learn-section {
    padding-bottom: 30px;
    margin-bottom: 30px;
  }
  .footer-main {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'intro calculate'
      'good understand';
    gap: 24px;
  }
  .footer-intro {
    grid-area: intro;
  }
  .footer-calculate {
    grid-area: calculate;
  }
  .footer-understand {
    grid-area: understand;
  }
  .footer-good-to-know {
    grid-area: good;
  }
  .footer-main > div > p {
    margin: 16px 0;
  }
  .footer-main h2 {
    margin-bottom: 13px;
  }
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .contact-layout aside h2 {
    max-width: none;
  }
  .info-page {
    padding-top: 30px;
  }
  .info-hero > p:last-child {
    font-size: 1rem;
  }
  .contact-form {
    padding: 25px;
  }
  .related-art {
    font-size: 72px;
  }
  .related-card {
    padding: 26px;
  }
}
@media (max-width: 420px) {
  .container {
    width: calc(100% - 28px);
  }
  .header-inner {
    flex-wrap: wrap;
    padding: 14px 0 8px;
    gap: 8px;
  }
  .header-inner nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .header-inner nav a {
    padding: 8px 0;
  }
  .header-inner nav a:last-child {
    padding: 5px 12px;
  }
  .tool-top {
    padding-top: 23px;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
  .hero-description {
    font-size: 0.92rem;
  }
  .hero-support {
    font-size: 0.75rem;
  }
  .calculator-input,
  .result-panel {
    padding: 20px;
  }
  .workspace-heading {
    align-items: flex-start;
  }
  .workspace-heading h2 {
    font-size: 1rem;
    max-width: 17ch;
  }
  .small-tag {
    font-size: 0.65rem;
  }
  .ratio-inputs {
    gap: 9px;
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
    margin-top: 20px;
  }
  .field label {
    font-size: 0.66rem;
  }
  .field input {
    padding: 9px;
    font-size: 1rem;
  }
  .field input::placeholder {
    font-size: 0.72rem;
  }
  .button {
    padding: 11px 16px;
    gap: 14px;
  }
  .actions {
    gap: 9px;
  }
  .text-button {
    font-size: 0.68rem;
  }
  .sample-row {
    gap: 7px;
  }
  .sample-row > span {
    width: 100%;
  }
  .example-grid {
    grid-template-columns: 1fr;
  }
  .related-art {
    display: none;
  }
  .contents nav {
    column-gap: 17px;
  }
  .contents nav a {
    font-size: 0.64rem;
  }
  .point-inputs {
    gap: 16px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
  .contact-form {
    padding: 20px;
  }
  .formula-block {
    padding: 20px 12px;
  }
  .learn-section p,
  .learn-section li,
  .prose p,
  .prose li {
    font-size: 0.89rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
@supports (content-visibility: auto) {
  .learn-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 550px;
  }
}
@media print {
  .site-header,
  .site-footer,
  .contents,
  .tool-notes,
  .sample-row,
  .actions,
  .related-card,
  .related-top,
  #result-actions {
    display: none !important;
  }
  .container {
    width: 100%;
  }
  .learning-layout {
    display: block;
  }
  .calculator {
    break-inside: avoid;
    box-shadow: none;
  }
  .result-panel {
    background: #fff;
  }
  .tool-top {
    background: #fff;
  }
  .learn-section {
    break-inside: avoid;
    content-visibility: visible;
    contain-intrinsic-size: none;
  }
  body {
    font-size: 12px;
  }
}
