@font-face {
  font-family: "Noto Sans JP";
  src: url("fonts/noto-sans-jp.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  font-family: "Noto Sans JP", "Hiragino Sans", Meiryo, system-ui, sans-serif;
  color: #1d2938;
  background: #fff;
  line-height: 1.7;
  --navy: #112e49;
  --blue: #245a82;
  --muted: #526071;
  --line: #dbe2e8;
  --surface: #f3f7fa;
}
* { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
.masthead, main, .site-footer { width: min(64rem, calc(100% - 3rem)); margin-inline: auto; }
header { border-top: 4px solid var(--navy); border-bottom: 1px solid var(--line); }
.masthead { min-height: 3.75rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem 1.25rem; padding-block: .65rem; }
.site-label, .masthead nav { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem 1rem; }
.site-label { color: var(--navy); font-weight: 700; }
.site-label small { color: var(--muted); font-size: .8125rem; font-weight: 400; }
.masthead a { font-size: .875rem; white-space: nowrap; }
a { color: var(--blue); text-underline-offset: .2em; }
main { padding-block: clamp(1.25rem, 4vw, 2.6rem) 2rem; }
.page-heading { margin-bottom: 1.25rem; }
h1 { color: var(--navy); font-size: clamp(1.55rem, 3.5vw, 2.15rem); line-height: 1.4; overflow-wrap: anywhere; }
.page-heading p { color: var(--muted); margin-top: .35rem; font-size: .9375rem; }
h2 { color: var(--navy); font-size: 1.05rem; }
.converter { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 3.25rem); border-top: 1px solid var(--line); padding-block: 1.15rem 1.4rem; align-items: start; }
.converter:has(.result[hidden]) { grid-template-columns: minmax(0, 1fr); }
form { min-width: 0; max-width: 42rem; }
form h2 { margin-bottom: .85rem; }
.scope-note { margin: -.2rem 0 .85rem; padding: .5rem .7rem; border-left: 2px solid var(--blue); background: var(--surface); color: var(--navy); font-size: .875rem; }
label { display: block; margin-bottom: .28rem; font-size: .9375rem; font-weight: 700; }
input, select, button { font: inherit; }
input[type="text"], select { width: 100%; min-height: 2.75rem; border: 1px solid #8d9ba8; border-radius: .25rem; color: inherit; background-color: white; padding: .42rem .75rem; }
input::placeholder { color: #596879; }
select {
  cursor: pointer;
}
#conversion-fields { margin-top: .85rem; }
#office { margin-bottom: .85rem; }
.field-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .75rem; }
.field-heading a { font-size: .875rem; }
#table-details { scroll-margin-top: 1rem; }
[aria-invalid="true"] { border-color: #9e2735; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
button { cursor: pointer; border: 1px solid var(--blue); border-radius: .25rem; min-height: 2.75rem; padding: .45rem .9rem; color: white; background: var(--blue); font-weight: 700; }
button:hover:not(:disabled) { background: var(--navy); }
button.secondary { color: var(--blue); background: white; border-color: #8eabbf; }
button.secondary:hover:not(:disabled) { background: var(--surface); }
button:disabled { color: #647180; background: #edf1f4; border-color: var(--line); cursor: default; }
.hint, .meta, .copy-note, .privacy { color: var(--muted); font-size: .875rem; }
.hint { margin: .35rem 0 .8rem; }
.hint:empty, .meta:empty, .copy-note:empty { display: none; }
.error { color: #9e2735; margin-top: .4rem; font-size: .9375rem; }
.privacy { margin-top: .8rem; }
.examples { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .75rem; margin-top: .55rem; font-size: .875rem; color: var(--muted); }
.examples button.secondary { border: 0; border-radius: 0; background: none; padding: .25rem 0; min-height: 2rem; text-decoration: underline; text-underline-offset: .17em; font-size: inherit; font-weight: 400; }
.examples button.secondary:hover { color: var(--navy); background: none; }
.result { min-width: 0; }
.result-panel { background: var(--surface); border-top: 2px solid var(--blue); padding: 1rem 1.15rem; }
.value { display: block; margin: .5rem 0 .7rem; color: var(--navy); font: 700 clamp(1.85rem, 5.6vw, 3rem)/1.2 "Inter", "Noto Sans JP", sans-serif; letter-spacing: .015em; font-variant-numeric: tabular-nums; }
.meta { margin: -.25rem 0 .7rem; font-variant-numeric: tabular-nums; }
.branch-date { margin: .35rem 0 0; }
.copy-note { margin-top: .4rem; }
.format-option { display: flex; align-items: center; gap: .5rem; margin: 0 0 .65rem; min-height: 1.75rem; font-size: .875rem; }
.format-option input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--blue); }
.reference { border-top: 1px solid var(--line); padding-top: 1rem; }
.notice { margin-bottom: .85rem; max-width: 48rem; padding: .85rem 1rem; background: var(--surface); border-left: 3px solid var(--blue); }
.notice h2 { margin-bottom: .3rem; }
.notice p, .coverage p { color: var(--muted); font-size: .9375rem; }
.notice p + p { margin-top: .3rem; }
.notice .data-note { margin-bottom: .65rem; }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; color: var(--navy); font-weight: 700; padding-block: .65rem; }
details p, .tables { margin: .15rem 0 .9rem; }
details p { max-width: 48rem; }
.coverage { margin-top: 1.25rem; }
.coverage h2 { margin-bottom: .22rem; }
.tables { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 700; margin-bottom: .25rem; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: .35rem .45rem; }
th { background: var(--surface); }
.office-group { text-align: center; vertical-align: middle; background: #fff; border-right: 1px solid var(--line); }
th:last-child, td:last-child { text-align: right; white-space: nowrap; }
.ad-placement { margin-top: 1.5rem; }
.ad-label { color: var(--muted); font-size: .8125rem; margin-bottom: .25rem; }
.ad-slot { min-height: 6rem; border: 1px solid var(--line); display: grid; place-items: center; padding: .6rem; color: var(--muted); font-size: .8125rem; }
.ad-desktop { display: none; }
.site-footer { padding-block: .85rem 1.5rem; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
[hidden] { display: none !important; }
@media (min-width: 45rem) {
  .ad-desktop { display: block; }
  .ad-mobile { display: none; }
  .converter:has(.result[hidden]) ~ .ad-mobile { display: block; }
}
@media (max-width: 44.99rem) {
  .masthead, main, .site-footer { width: calc(100% - 2rem); }
  .masthead { min-height: auto; }
  .masthead nav { width: 100%; }
  .converter, .tables { grid-template-columns: minmax(0, 1fr); }
  .converter { gap: .9rem; }
  button[type="submit"] { width: 100%; }
}

.reference h3 { margin: .8rem 0 .2rem; font-size: .9375rem; color: var(--navy); }
.info-page { max-width: 48rem; }
.info-page section { margin-top: 1.5rem; }
.info-page section p { margin-top: .35rem; }
