:root {
  color-scheme: light;
  --ink: #252b29;
  --muted: #525b56;
  --line: #d7ddd8;
  --wash: #f3f5f1;
  --accent: #225842;
  --accent-dark: #184432;
  --price: #9e4028;
  --paper: #fff;
  font-family: "メイリオ", Meiryo, "Hiragino Sans", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "Yu Gothic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 1rem; line-height: 1.75; }
:where(h1, h2, h3, p, ol, ul, dl, dd) { margin: 0; }
a { color: var(--accent-dark); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #3b8765; outline-offset: 3px; }
[id] { scroll-margin-top: 1.5rem; }
.skip { position: fixed; z-index: 2; top: .55rem; left: .55rem; transform: translateY(-175%); background: white; padding: .5rem 1rem; }
.skip:focus { transform: none; }

.layout { width: min(calc(100% - 3rem), 52rem); margin-inline: auto; }
.masthead { border-top: 3px solid var(--accent-dark); border-bottom: 1px solid var(--line); }
.masthead-inner {
  width: min(calc(100% - 3rem), 65rem);
  min-height: 3.3rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}
.brand { color: var(--ink); font-size: 1rem; font-weight: 750; text-decoration: none; }
.masthead nav { display: flex; align-items: center; column-gap: 1.3rem; flex-wrap: wrap; }
.masthead nav a { color: var(--muted); font-size: .875rem; text-decoration: none; }
.masthead nav a:hover { text-decoration: underline; }

.article-header { padding-top: clamp(1.55rem, 3.8vw, 3rem); }
.category { color: var(--accent-dark); font-size: .875rem; font-weight: 700; margin-bottom: .35rem; }
h1 { font-size: clamp(1.62rem, 4vw, 2.125rem); line-height: 1.42; letter-spacing: -.017em; }
.byline { margin: .45rem 0 1.05rem; color: var(--muted); font-size: .875rem; }
.intro { max-width: 47rem; }
.section { margin-top: clamp(2.15rem, 5vw, 3.2rem); }
.first-section { margin-top: 1.55rem; }
h2 { padding-bottom: .36rem; border-bottom: 1px solid var(--line); font-size: clamp(1.2rem, 3.6vw, 1.53rem); line-height: 1.5; }
h3 { font-size: 1.15rem; line-height: 1.5; }
.section-text { margin-top: .7rem; }

.comparison { width: 100%; margin-top: .62rem; table-layout: fixed; border-collapse: collapse; font-size: .94rem; line-height: 1.5; text-align: left; }
.comparison caption { padding-bottom: .45rem; text-align: left; font-size: .875rem; color: var(--muted); }
.comparison th, .comparison td { border: 1px solid var(--line); padding: .53rem .8rem; vertical-align: top; overflow-wrap: anywhere; }
.comparison th:first-child { width: 25%; }
.comparison thead th { background: var(--wash); font-weight: 720; }
.comparison td { font-variant-numeric: tabular-nums; }
.comparison tbody th { color: #39433e; font-weight: 650; background: #fafbf9; }
.comparison small { display: block; color: var(--muted); font-size: .875rem; }
.plan-size { display: inline-block; margin-left: .22rem; white-space: nowrap; }
.price { display: inline-block; color: var(--price); font-variant-numeric: tabular-nums; font-size: clamp(1.04rem, 3.6vw, 1.24rem); letter-spacing: -.025em; }
.button {
  background: #fff;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  border-radius: .25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .42rem .8rem;
  min-height: 2.65rem;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  font-size: .94rem;
  font-weight: 720;
  line-height: 1.4;
  cursor: pointer;
}
.button:hover { background: #ecf2ed; }
.action-row .button { color: #fff; background: var(--accent); min-width: min(100%, 9.5rem); }
.action-row .button:hover { background: var(--accent-dark); }
.button.primary { color: #fff; background: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.sub-link { display: block; margin-top: .33rem; font-size: .875rem; }
.note { margin-top: .55rem; color: var(--muted); font-size: .875rem; line-height: 1.65; }
.fee-details { margin-top: .55rem; }
summary { color: var(--accent-dark); font-weight: 650; cursor: pointer; }
summary:hover { text-decoration: underline; text-underline-offset: .2em; }

.calculator { margin-top: .9rem; padding: clamp(.8rem, 3vw, 1.35rem); border: 1px solid var(--line); background: #fafbf9; }
.field-pair, .field-trio { display: grid; gap: .85rem; }
.field-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; align-self: start; gap: .24rem; min-width: 0; font-weight: 650; font-size: .9rem; }
.field small { font-size: .875rem; color: var(--muted); font-weight: 400; line-height: 1.45; }
.input-unit { position: relative; display: block; }
.input-unit span { position: absolute; top: 50%; right: .68rem; font-size: .875rem; font-weight: 500; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
input, select { display: block; width: 100%; min-width: 0; min-height: 2.7rem; padding: .44rem .56rem; border: 1px solid #a6b2ab; background: #fff; border-radius: .2rem; color: var(--ink); font: inherit; font-size: 1rem; font-weight: 450; }
input { padding-right: 2.15rem; }
input[type="number"] { appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button { appearance: none; }
select { padding-right: 1.35rem; appearance: none; background-image: linear-gradient(45deg, transparent 49%, #525b56 50%), linear-gradient(135deg, #525b56 50%, transparent 51%); background-position: calc(100% - .8rem) 50%, calc(100% - .52rem) 50%; background-size: .28rem .3rem; background-repeat: no-repeat; }
.usage { padding: 0; margin: .82rem 0; min-width: 0; border: 0; }
.usage legend { padding: 0; margin-bottom: .15rem; font-size: .94rem; font-weight: 700; }
.usage .field { color: var(--muted); }
.extra-settings { margin: .85rem 0; padding-top: .64rem; border-top: 1px solid var(--line); font-size: .9rem; }
.extra-settings .field-pair { margin-top: .6rem; }
.calculator button { width: min(100%, 16rem); }

.result { margin-top: 1rem; border: 1px solid #b4c6bc; padding: clamp(.85rem, 3vw, 1.32rem); }
.result-message { margin: .5rem 0; font-weight: 720; }
.result-list { margin-top: .65rem; border-top: 1px solid var(--line); }
.result-list div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; border-bottom: 1px solid var(--line); padding: .54rem .45rem; }
.result-list .is-recommended { background: var(--wash); }
.result-list dd { font-weight: 750; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.result-list .is-recommended dd { color: var(--price); }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .85rem; margin-top: .75rem; }
.result-actions > a:not(.button) { font-size: .9rem; }

.guide section { margin-top: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.guide ol { padding-left: 1.45rem; margin: .38rem 0 .68rem; }
.guide li + li { margin-top: .28rem; }
.sources { margin-bottom: 2.6rem; }
.sources ul { padding-left: 1.25rem; margin-top: .55rem; font-size: .875rem; }
.sources li + li { margin-top: .26rem; }
.footer { border-top: 1px solid var(--line); background: var(--wash); padding: 1.1rem 0 1.45rem; }
.footer p { margin-top: .25rem; color: var(--muted); font-size: .875rem; }

@media (max-width: 42rem) {
  .layout, .masthead-inner { width: calc(100% - 2rem); }
  .masthead-inner { min-height: 3.1rem; }
  .masthead nav { column-gap: .65rem; }
  .masthead .brand, .masthead nav a { font-size: .875rem; }
  .headline-break { display: none; }
  .comparison th, .comparison td { padding: .44rem .48rem; }
  .comparison th:first-child { width: 24%; }
  .comparison .plan-size { display: block; margin: .05rem 0 0; }
  .comparison .button { padding-inline: .23rem; width: 100%; font-size: .875rem; }
  .comparison small, .comparison .sub-link { font-size: .8125rem; }
}
@media (max-width: 24rem) {
  .masthead-inner { column-gap: .35rem; }
  .masthead nav { column-gap: .45rem; }
  .field-pair { grid-template-columns: 1fr; }
  .field-trio { gap: .4rem; }
  .comparison th, .comparison td { padding-inline: .35rem; }
}
