/* Dev Tools site. System font stacks only: no webfont requests. */
:root {
  --paper: #eef0ea;
  --surface: #fafbf7;
  --ink: #15202b;
  --ink-2: #44505c;
  --rule: #c6cdc4;
  --blue: #2a3bc0;
  --blue-deep: #1d2a8f;
  --blue-tint: #dfe3f7;
  --amber: #a84a00;
  --amber-tint: #f6dfc9;
  --ok: #1b6b3a;
  --err: #a3191f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --rail: 11rem;
  --wrap: 72rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 1rem/1.6 var(--sans); overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--blue-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: 0; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10; transform: translateY(-150%); }
.skip:focus { transform: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* header */
.site-head { border-bottom: 1px solid var(--rule); background: var(--surface); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 2rem; padding-top: .8rem; padding-bottom: .8rem; }
.brand { font: 700 1.05rem/1 var(--mono); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--blue); }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.nav a { color: var(--ink); text-decoration: none; padding: .35rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--blue); }

/* section scaffolding: label rail + content */
.sec { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
.sec:first-of-type { border-top: 0; }
.sec > .wrap { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 0 2.5rem; }
.rail { font: .85rem/1.4 var(--mono); color: var(--ink-2); padding-top: .55rem; }
.body > :first-child { margin-top: 0; }
@media (max-width: 800px) {
  .sec { padding: 2.5rem 0; }
  .sec > .wrap { grid-template-columns: minmax(0, 1fr); }
  .rail { padding: 0 0 .75rem; }
}

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; letter-spacing: -.012em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.1rem, 5.2vw + .4rem, 4rem); max-width: 18ch; }
h2 { font-size: clamp(1.6rem, 2.4vw + .8rem, 2.4rem); max-width: 24ch; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 56ch; }
code, kbd, pre { font-family: var(--mono); }
code { overflow-wrap: anywhere; font-size: .9em; background: var(--surface); border: 1px solid var(--rule); border-radius: 3px; padding: .05em .3em; }
pre {
  background: var(--ink); color: #e9eef2; padding: 1rem 1.1rem; border-radius: 4px;
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: .88rem; line-height: 1.55; margin: 0 0 1.25em; max-width: 100%;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
ul.plain, ol.plain { margin: 0 0 1em; padding-left: 1.2rem; max-width: 66ch; }
ul.plain li, ol.plain li { margin-bottom: .45em; }

/* buttons */
.btn {
  display: inline-block; font: 600 1rem/1.2 var(--sans); padding: .8rem 1.3rem; border-radius: 3px;
  background: var(--blue); color: #fff; text-decoration: none; border: 2px solid var(--blue); cursor: pointer;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn.ghost { background: transparent; color: var(--blue-deep); }
.btn.ghost:hover { background: var(--blue-tint); color: var(--blue-deep); }
.btn.small { padding: .5rem .85rem; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin: 1.25rem 0 0; }

/* hero */
.hero { padding: 3.5rem 0 3rem; }
.hero .lede { margin-top: 1.1rem; }
.meter { margin: 2.5rem 0 0; max-width: 56rem; }
.meter-label { font: .85rem/1.4 var(--mono); color: var(--ink-2); display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .35rem; }
.strip { height: 2.25rem; background: var(--surface); border: 1px solid var(--ink); position: relative; display: flex; }
.strip .seg { height: 100%; min-width: 2px; }
.strip.window .seg { background: var(--amber); }
.seg.c0 { background: var(--amber); }
.seg.c1 { background: var(--blue); }
.seg.c2 { background: #7a86d6; }
.seg.c3 { background: #49555f; }
.seg.c4 { background: #98a1a9; }
.seg + .seg { border-left: 2px solid var(--surface); }
.zoom-link { height: 1.1rem; border-left: 1px dashed var(--ink-2); border-right: 1px dashed var(--ink-2); margin: 0 0 0 0; }
.meter figcaption { font-size: .92rem; color: var(--ink-2); margin-top: .6rem; max-width: 60ch; }
.legend { list-style: none; margin: .7rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; font: .85rem/1.4 var(--mono); }
.legend i { display: inline-block; width: .8rem; height: .8rem; margin-right: .4rem; vertical-align: -.05rem; }

/* lists of products */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.pair > div { border-top: 3px solid var(--ink); padding-top: 1rem; }
.price { font: 700 1.1rem var(--mono); }
.price small { font-weight: 400; color: var(--ink-2); }
@media (max-width: 800px) { .pair { grid-template-columns: minmax(0, 1fr); } }

/* tables */
.tbl-wrap { overflow-x: auto; margin: 0 0 1.25em; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
caption { text-align: left; font: .85rem/1.4 var(--mono); color: var(--ink-2); padding-bottom: .5rem; }
th, td { overflow-wrap: anywhere; text-align: left; padding: .5rem .75rem .5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; }
td.num, th.num { text-align: right; font-family: var(--mono); white-space: nowrap; padding-right: 1rem; }
.rules td:first-child { font-family: var(--mono); white-space: nowrap; font-size: .85rem; }

/* split panel (free vs paid) */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--ink); background: var(--surface); }
.split > div { padding: 1.25rem 1.4rem; }
.split > div + div { border-left: 1px solid var(--ink); }
.split h3 { margin-bottom: .4em; }
@media (max-width: 800px) { .split { grid-template-columns: minmax(0, 1fr); } .split > div + div { border-left: 0; border-top: 1px solid var(--ink); } }

/* forms */
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=number], select {
  font: 1rem var(--sans); color: var(--ink); background: #fff; border: 1px solid #5d6872; border-radius: 3px;
  padding: .55rem .65rem; width: 100%; min-height: 2.6rem;
}
.hint { font-size: .88rem; color: var(--ink-2); }
.sub { background: var(--surface); border: 1px solid var(--rule); padding: 1.25rem 1.4rem; max-width: 40rem; }
.sub h3 { font-size: 1.15rem; margin-bottom: .35em; }
.sub-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.sub-row .field { flex: 1 1 14rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.5em; margin: .6rem 0 0; font-size: .95rem; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
.status.dup { color: var(--ink); }

/* calculator */
.calc-grid { display: grid; gap: 2rem; }
.srv-table input, .srv-table select { min-width: 5.5rem; }
.srv-table td, .srv-table th { padding-right: .6rem; }
.srv-table td:first-child input { min-width: 9rem; }
.srv-table .btn { white-space: nowrap; }
.calc-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .5rem 0 1.25rem; align-items: center; }
.opt { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin: 0 0 1.5rem; }
.opt .field { flex: 1 1 15rem; max-width: 22rem; }
.result { background: var(--surface); border: 1px solid var(--ink); padding: 1.4rem 1.5rem; }
.total { font: 700 clamp(2.2rem, 6vw, 3.4rem)/1 var(--mono); letter-spacing: -.03em; margin: .2rem 0 .3rem; }
.total small { font-size: .35em; letter-spacing: 0; font-weight: 400; color: var(--ink-2); }
.range { font: .95rem/1.4 var(--mono); color: var(--ink-2); margin: 0 0 1rem; }
.bars { list-style: none; margin: 1rem 0 0; padding: 0; }
.bars li { display: grid; grid-template-columns: minmax(6rem, 11rem) minmax(0, 1fr) 9.5rem; gap: .75rem; align-items: center; padding: .35rem 0; font-size: .93rem; }
.bars .nm { overflow-wrap: anywhere; font-weight: 600; }
.bars .track { background: var(--paper); height: .9rem; border: 1px solid var(--rule); }
.bars .fill { display: block; height: 100%; background: var(--blue); }
.bars li.top .fill { background: var(--amber); }
.bars .val { font: .85rem var(--mono); text-align: right; }
@media (max-width: 600px) { .bars li { grid-template-columns: minmax(0, 1fr) auto; } .bars .track { grid-column: 1 / -1; order: 3; } }
.save-table td.num strong { font-weight: 700; }
.empty { color: var(--ink-2); }
.callout { border-left: 4px solid var(--blue); padding: .2rem 0 .2rem 1rem; margin: 1.25rem 0; max-width: 66ch; }
.err-msg { color: var(--err); font-size: .92rem; }

/* footer */
.site-foot { border-top: 1px solid var(--ink); background: var(--surface); padding: 2.5rem 0 3rem; font-size: .93rem; color: var(--ink-2); }
.site-foot .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem 2rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .3rem; }
.site-foot p { max-width: 36ch; }

/* one page-load moment: the hero strips fill in */
@media (prefers-reduced-motion: no-preference) {
  .hero .strip .seg { transform-origin: left; animation: grow .9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero .strip .seg:nth-child(2) { animation-delay: .1s; }
  .hero .strip .seg:nth-child(3) { animation-delay: .2s; }
}
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 700px) {
  .srv-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .srv-table, .srv-table tbody, .srv-table tr, .srv-table td { display: block; width: 100%; }
  .srv-table tr { border: 1px solid var(--rule); background: var(--surface); padding: .75rem; margin-bottom: .75rem; }
  .srv-table td { border: 0; padding: .25rem 0; }
  .srv-table td::before { content: attr(data-label); display: block; font-weight: 600; font-size: .88rem; }
  .srv-table td:first-child input { min-width: 0; }
}
@media (max-width: 700px) { .srv-table caption { display: block; width: 100%; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hooks td:first-child, .rules td:first-child { white-space: nowrap; }
.hooks td:first-child code, .rules td:first-child { overflow-wrap: normal; }
