:root {
  font: 100%/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #14283a;
  background: #f4f7f8;
  color-scheme: light;
  --navy: #122a3c;
  --teal: #075e60;
  --line: #ccdade;
  --muted: #40576a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--teal); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #bd7516; outline-offset: 3px; }
.wrap { width: min(100%, 70.5rem); margin-inline: auto; padding-inline: 1.25rem; }
.site-header { background: var(--navy); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 4rem; }
.header-inner a { color: #fff; }
.brand { text-decoration: none; font-weight: 750; }
main { padding-block: clamp(2rem, 5vw, 3.75rem); }
.intro { max-width: 47rem; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1.02; letter-spacing: -.045em; margin: 0; }
.intro p { color: var(--muted); font-size: 1.05rem; margin: .85rem 0 0; }
.tools-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 1rem 0 1.15rem; }
.tools-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 650; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.panel { min-width: 0; padding: clamp(1rem, 3vw, 1.5rem); background: #fff; border: 1px solid var(--line); border-radius: .75rem; scroll-margin: 1rem; }
.panel:target { border-color: var(--teal); }
.panel-wide { grid-column: 1 / -1; }
.direct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .85rem; margin-bottom: 1rem; }
.direct-grid fieldset { min-width: 0; margin: 0; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: .45rem; }
.direct-grid legend { padding-inline: .3rem; font-weight: 675; }
h2 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.panel p { margin-block: .6rem .9rem; }
.panel .note, .sources { color: var(--muted); font-size: .9rem; }
.panel .sources { margin-bottom: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; align-items: end; }
.fields .wide { grid-column: 1 / -1; }
select { text-overflow: ellipsis; }
.scope-note { margin-block: .85rem 1rem; font-size: .92rem; color: var(--muted); }
.scope-note summary { color: var(--teal); font-weight: 650; cursor: pointer; }
label { display: grid; gap: .28rem; font-weight: 630; font-size: .92rem; }
input, select { width: 100%; min-width: 0; min-height: 2.8rem; padding: .45rem .6rem; font: inherit; font-size: 1rem; font-weight: 400; color: inherit; background: #fff; border: 1px solid #79939d; border-radius: .35rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
button, .button { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 650; min-height: 2.75rem; border: 1px solid var(--teal); border-radius: .35rem; padding: .5rem .85rem; color: #fff; background: var(--teal); text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: #05494a; }
button:disabled { opacity: .55; cursor: default; }
.secondary { color: var(--teal); background: #fff; }
.secondary:hover { background: #e5f0ee; }
.result:not(:empty) { margin-block: .9rem; padding: .7rem .85rem; border-inline-start: .22rem solid var(--teal); background: #e9f4f2; }
.result.error:not(:empty) { color: #7a3217; border-color: #a34a24; background: #fff1e8; }
.result p { margin: .2rem 0; }
.result dl { margin: 0; }
.result dl div + div { margin-top: .42rem; }
.result dt { font-weight: 650; }
.result dd { margin: 0; }

@media (max-width: 47rem) {
  .grid, .direct-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 28rem) {
  .fields { grid-template-columns: minmax(0, 1fr); }
}
