@font-face {
  font-family: 'GitLab Sans';
  src: url('assets/fonts/GitLabSans-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Pajamas colour tokens (design.gitlab.com/product-foundations/color). */
:root {
  color-scheme: light;
  --text: #3a383d;
  --heading: #18171d;
  --muted: #646163;
  --border: #dcdbd9;
  --input-border: #8a8888;
  --bg: #fff;
  --panel: #f7f7f5;
  --link: #27599f;
  --focus: #1f73ca;
  --brand: #6a54c0;
  --green: #0b645a; --green-border: #0d8070; --green-bg: #e6f5ea;
  --amber: #9e3811; --amber-border: #c74816; --amber-bg: #fdf0d5;
  --red: #ac203a; --red-border: #de1d4b; --red-bg: #feeef0;
  --info: #27599f; --info-border: #1f73ca; --info-bg: #e8f2fd;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 'GitLab Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, legend, summary { color: var(--heading); }
h1 { margin: 0; font-size: 1.5rem; line-height: 1.25; font-weight: 600; }
h2 { font-size: 1.3125rem; line-height: 1.25; margin: 0 0 1rem; font-weight: 600; }
h3 { font-size: 1rem; margin: 1.5rem 0 .5rem; font-weight: 600; }
p { margin: 0 0 1rem; }
a { color: var(--link); }
code, pre { font-family: 'GitLab Mono', Menlo, 'DejaVu Sans Mono', 'Liberation Mono', Consolas, 'Ubuntu Mono', 'Courier New', monospace; font-size: .875rem; }
code { overflow-wrap: anywhere; }
pre { background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: .75rem 1rem; overflow-x: auto; white-space: pre-wrap; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input:focus-visible, select:focus-visible { outline-offset: 1px; }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 10; background: var(--bg); padding: .5rem 1rem; border: 1px solid var(--border); border-radius: 4px; }
.skip-link:focus { top: .5rem; }

.wrap { max-width: 1104px; margin: 0 auto; padding: 0 1rem; }

header { border-top: 4px solid var(--brand); border-bottom: 1px solid var(--border); background: var(--bg); }
header .wrap { padding-top: 1rem; padding-bottom: 1.5rem; }
.brand-logo { display: inline-block; padding: 8px 0; margin-bottom: .5rem; line-height: 0; }
.brand-logo img { display: block; height: 28px; width: auto; }
.subtitle { margin: .5rem 0 0; color: var(--text); max-width: 46rem; }
.header-note { margin: .5rem 0 0; color: var(--muted); font-size: .875rem; max-width: 46rem; }

main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 0; }
.calc > * { min-width: 0; margin-bottom: 1.5rem; }
@media (min-width: 900px) {
  .calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
  .calc > * { margin-bottom: 0; }
  #in-short { grid-column: 1; grid-row: 1; }
  #inputs { grid-column: 1; grid-row: 2; }
  #results { grid-column: 2; grid-row: 1 / span 2; }
}
section, form { border: 1px solid var(--border); border-radius: 4px; padding: 1rem 1.5rem; background: var(--bg); }
section > :last-child, form > :last-child { margin-bottom: 0; }

fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
legend { padding: 0; font-size: 1.125rem; font-weight: 600; margin-bottom: .5rem; }
.field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; margin-bottom: .25rem; }
input, select { width: 100%; max-width: 15rem; font: inherit; padding: .5rem .75rem; border: 1px solid var(--input-border); border-radius: 4px; background: #fff; color: var(--text); }
select { max-width: 100%; }
input[aria-invalid='true'] { border-color: var(--red-border); box-shadow: inset 0 0 0 1px var(--red-border); }
.help { font-size: .875rem; color: var(--muted); margin: .25rem 0 0; }
.field-error { display: flex; gap: .5rem; align-items: flex-start; font-size: .875rem; color: var(--red); margin: .25rem 0 0; }
.hidden { display: none; }

details { margin: 0 0 1rem; }
summary { cursor: pointer; font-weight: 600; padding: .25rem 0; }
details[open] > summary { margin-bottom: .5rem; }
.advanced { border-top: 1px solid var(--border); padding-top: 1rem; }

.icon { width: 16px; height: 16px; flex: none; fill: currentColor; vertical-align: -3px; }

html:not(.js) .actions { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.btn { display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-size: .875rem; color: var(--heading); background: var(--bg); border: 1px solid var(--input-border); border-radius: 4px; padding: .5rem .75rem; cursor: pointer; }
.btn:hover { background: var(--panel); }
.status { font-size: .875rem; color: var(--muted); margin: .5rem 0 0; min-height: 1.3em; }

table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
@media (min-width: 600px) { td.n, th.n { white-space: nowrap; } }
.table-scroll { overflow-x: auto; }

/* Pajamas alert look for the verdict and the margin note. */
.verdict, .note { display: flex; gap: .75rem; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; border-left: 4px solid; }
.verdict > .icon, .note > .icon { margin-top: 4px; }
.verdict-title { font-weight: 600; font-size: 1.125rem; color: var(--heading); margin: 0 0 .5rem; line-height: 1.4; }
.verdict-checks { list-style: none; margin: 0; padding: 0; }
.verdict-checks li { display: flex; gap: .5rem; margin: 0 0 .5rem; }
.verdict-checks li .icon { margin-top: 4px; }
.verdict-checks li:last-child { margin-bottom: 0; }
.verdict-notes { margin: .5rem 0 0; font-size: .875rem; }
.verdict-notes p { margin: .25rem 0 0; }
.green { background: var(--green-bg); border-color: var(--green-border); }
.amber { background: var(--amber-bg); border-color: var(--amber-border); }
.red { background: var(--red-bg); border-color: var(--red-border); }
.unchecked, .note-info { background: var(--info-bg); border-color: var(--info-border); }
.lvl-green { color: var(--green); }
.lvl-amber { color: var(--amber); }
.lvl-red { color: var(--red); }
.lvl-unchecked { color: var(--info); }
.note-title { font-weight: 600; color: var(--heading); margin: 0 0 .25rem; }
.note p:last-child { margin-bottom: 0; }
.note > .icon { color: var(--info); }

.badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 600; line-height: 1rem; padding: .125rem .5rem; border-radius: 1rem; white-space: nowrap; }
.badge .icon { width: 12px; height: 12px; vertical-align: 0; }
.badge.green { color: var(--green); }
.badge.amber { color: var(--amber); }
.badge.red { color: var(--red); }
.badge.unchecked { color: var(--info); }

.errors { color: var(--red); }
.errors a { color: var(--red); }
.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; }
.notice { background: var(--amber-bg); border-left: 4px solid var(--amber-border); border-radius: 4px; padding: 1rem; }

.mini-verdict { display: none; }
@media (max-width: 899px) {
  html { scroll-padding-bottom: 6rem; }
  .mini-verdict.show { display: block; position: sticky; bottom: 0; z-index: 1; padding: .5rem 1rem; border-top: 1px solid var(--border); background: var(--bg); box-shadow: 0 -2px 4px rgba(5, 5, 6, .08); }
  .mini-verdict a { display: flex; gap: .5rem; align-items: center; color: var(--heading); text-decoration: none; font-weight: 600; font-size: .875rem; }
}

footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .875rem; padding: 1rem 0 2rem; }

@media print {
  .skip-link, .mini-verdict, .actions, .status, #js-warning { display: none !important; }
  section, form { border: 0; padding: 0; }
  details > summary { list-style: none; }
}
