/* Peppol Status Service. Colours, type and shape come from tokens.css
   (docs/design/tokens.css) and nowhere else. The CSP allows no inline
   styles, so every look a page needs is a class here. */
@import url("tokens.css");

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--blue); }
a:hover { color: var(--navy); }
h1, h2, h3 { margin: 0; color: var(--navy); font-weight: 700; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
table { border-collapse: collapse; width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; color: var(--navy); }
.nowrap { white-space: nowrap; }
.right { margin-left: auto; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.row-sm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cards and tables */
.card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 24px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.card-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 18px 24px; border-top: 1px solid var(--line); }
.card-row:first-child { border-top: none; }
.card-foot { padding: 14px 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.table-wrap { overflow-x: auto; }
.table th {
  padding: 12px 8px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.table td { padding: 12px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.table th:last-child, .table td:last-child { padding-right: 24px; }
.table .sub { font-size: 12px; color: var(--muted); }
.empty { padding: 24px; color: var(--muted); font-size: 13px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--paper); color: var(--navy); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--blue); color: var(--navy); }
.btn-primary { background: var(--button); border-color: var(--button); color: var(--on-accent); }
.btn-primary:hover { background: var(--button-hover); border-color: var(--button-hover); color: var(--on-accent); }
.btn-lg { min-height: 44px; padding: 0 18px; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-danger { border-color: transparent; background: transparent; color: var(--down-text); }
.btn-danger:hover { background: var(--down-bg); border-color: transparent; color: var(--down-text); }
.btn-icon { width: 40px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.link { background: none; border: none; padding: 0; color: var(--blue); cursor: pointer; font-weight: 500; text-decoration: none; }
.link:hover { color: var(--navy); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--navy); }
.input, .select, .textarea {
  min-height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--body); width: 100%;
}
.textarea { padding: 12px; resize: vertical; min-height: 88px; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.hint { font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); align-items: center; }
.error { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--down-bg); color: var(--down-text); font-size: 13px; font-weight: 600; }
.notice { padding: 14px 18px; border-radius: var(--radius); background: var(--maint-bg); color: var(--maint-text); font-size: 13px; }
.notice-ok { background: var(--ok-bg); color: var(--ok-text); }

/* Status */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-sm { width: 8px; height: 8px; }
.dot.operational { background: var(--ok-dot); }
.dot.degraded { background: var(--deg-dot); }
.dot.down { background: var(--down-dot); }
.dot.unknown { background: transparent; box-shadow: inset 0 0 0 2px var(--unk-dot); }
.dot.maintenance { background: var(--maint-dot); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.pill.operational { background: var(--ok-bg); color: var(--ok-text); }
.pill.degraded { background: var(--deg-bg); color: var(--deg-text); }
.pill.down { background: var(--down-bg); color: var(--down-text); }
.pill.unknown { background: var(--unk-bg); color: var(--unk-text); }
.pill.maintenance { background: var(--maint-bg); color: var(--maint-text); }
.pill.neutral { background: var(--unk-bg); color: var(--unk-text); }
.pill-sm { padding: 2px 10px; font-size: 12px; }
.level-text { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.level-text.operational { color: var(--ok-text); }
.level-text.degraded { color: var(--deg-text); }
.level-text.down { color: var(--down-text); }
.level-text.unknown { color: var(--unk-text); }
.level-text.maintenance { color: var(--maint-text); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--unk-bg); color: var(--unk-text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.maintenance { background: var(--maint-bg); color: var(--maint-text); }
.badge { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--maint-bg); color: var(--maint-text); font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }
.badge-red { background: var(--down-dot); color: var(--on-accent); }

/* Public pages */
.public-header { background: var(--paper); border-bottom: 1px solid var(--border); }
.public-header-inner { max-width: 1120px; margin: 0 auto; padding: 16px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy); }
.brand img { height: 32px; width: auto; }
.brand span { font-size: 18px; font-weight: 700; padding-left: 14px; border-left: 1px solid var(--border); }
.public-nav { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-left: auto; font-weight: 500; }
.public-nav a { display: inline-flex; align-items: center; gap: 8px; color: var(--body); text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.public-nav a:hover { color: var(--navy); }
.public-nav a.active { color: var(--navy); border-bottom-color: var(--blue); }
.public-main { width: 100%; max-width: 1120px; margin: 0 auto; padding: 32px; display: flex; flex-direction: column; gap: 28px; }
.public-footer { border-top: 1px solid var(--border); background: var(--paper); margin-top: auto; }
.public-footer-inner { max-width: 1120px; margin: 0 auto; padding: 24px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: 13px; color: var(--muted); }
.public-footer a { text-decoration: none; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page-title h1 { font-size: 28px; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 20px 24px; border-radius: var(--radius); border: 1px solid transparent; }
.banner .banner-title { font-size: 18px; font-weight: 700; }
.banner.down { background: var(--down-bg); border-color: var(--down-border); color: var(--down-text); }
.banner.degraded { background: var(--deg-bg); border-color: var(--deg-border); color: var(--deg-text); }
.banner.operational { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-text); }
.banner a { color: inherit; font-weight: 600; }

.service { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.service-toggle {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; width: 100%; padding: 18px 24px;
  background: none; border: none; text-align: left; cursor: pointer;
}
.service-toggle:hover { background: var(--hover); }
.service-name { font-size: 17px; font-weight: 700; color: var(--navy); }
.service-desc { font-size: 13px; color: var(--muted); }
.service-body { border-top: 1px solid var(--line); padding: 18px 24px 22px; display: flex; flex-direction: column; gap: 18px; }
.chevron { transition: transform 0.15s ease; color: var(--muted); }
.bars { display: flex; gap: 2px; height: 28px; align-items: stretch; }
.bar { flex: 1 1 0; border-radius: 2px; min-width: 2px; }
.bar.operational { background: var(--ok-dot); }
.bar.degraded { background: var(--deg-dot); }
.bar.down { background: var(--down-dot); }
.bar.maintenance { background: var(--maint-dot); }
.bar.unknown { background: var(--border); }
.bars-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.check-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.check-line:first-child { border-top: none; }
.feature-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 6px 0 6px 26px; font-size: 13px; color: var(--muted); }
.feature-line .feature-name { min-width: 150px; color: var(--body); font-weight: 500; }

.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline-item:first-child { border-top: none; }
.timeline-when { flex: 0 0 170px; font-size: 13px; color: var(--muted); }
.timeline-body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.timeline-kind { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

/* Console */
.console { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidebar {
  flex: 1 1 240px; max-width: 256px; background: var(--sidebar); color: var(--on-accent); display: flex; flex-direction: column; gap: 28px; padding: 24px 16px;
}
@media (max-width: 760px) { .sidebar { max-width: none; } }
.sidebar-brand { display: flex; flex-direction: column; gap: 8px; padding: 4px 12px; text-decoration: none; }
.sidebar-brand img { height: 30px; width: auto; align-self: flex-start; }
.sidebar-brand span { font-size: 13px; font-weight: 500; color: var(--sidebar-dim); }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--sidebar-text); font-weight: 500; text-decoration: none; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: var(--on-accent); }
.sidebar-nav a.active { background: var(--button); color: var(--on-accent); font-weight: 600; }
.sidebar-nav .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding: 16px 12px 4px; border-top: 1px solid var(--navy-line); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.sidebar-foot a, .sidebar-foot button { color: var(--sidebar-dim); text-decoration: none; background: none; border: none; padding: 0; text-align: left; cursor: pointer; font-size: 13px; }
.sidebar-foot a:hover, .sidebar-foot button:hover { color: var(--on-accent); }
.console-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.console-head { background: var(--paper); border-bottom: 1px solid var(--border); padding: 20px 32px; display: flex; flex-direction: column; gap: 10px; }
.console-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.console-head .crumb { font-size: 13px; font-weight: 500; text-decoration: none; }
.console-body { padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.tile { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.tile .tile-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.tile .tile-value { font-size: 28px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.tile .tile-sub { font-size: 13px; color: var(--muted); }
.tile.alert .tile-value { color: var(--down-text); }
.tile.warn .tile-value { color: var(--deg-text); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.settings-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--body); }
.settings-card:hover { border-color: var(--blue); color: var(--body); }
.settings-card h2 { font-size: 16px; }
.settings-card .arrow { margin-top: auto; font-weight: 600; color: var(--blue); font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--navy); border-bottom-color: var(--blue); }
.editor { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.editor-main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.editor-aside { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; flex-direction: column; gap: 16px; }
.step-title { display: flex; align-items: center; gap: 12px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--step); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.feature-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.feature-card.on { border-color: var(--blue); background: var(--selected); }
.feature-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.feature-head .feature-title { font-weight: 600; color: var(--navy); }
.feature-head .always { font-size: 12px; color: var(--muted); }
.feature-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding-left: 26px; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* Modal */
/* A <dialog> opened with showModal(): the browser keeps focus inside it and
   Escape closes it; app.js closes it on the backdrop and the × too. */
dialog.modal { width: calc(100% - 48px); max-width: 600px; max-height: calc(100% - 48px); overflow: auto; margin: auto; border: none; color: var(--body); background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0; }
dialog.modal::backdrop { background: var(--backdrop); }
.modal-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.modal-head { display: flex; align-items: center; gap: 12px; }
.modal-head h2 { font-size: 18px; }
.modal-sm { max-width: 480px; }

/* ------------------------------------------------------------------------
   Additions to the reference stylesheet: what it did with inline styles,
   and what the Go port needs besides. */

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn:focus-visible, .link:focus-visible, .service-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.modal-x { margin-left: auto; width: 36px; height: 36px; border: none; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; border-radius: var(--radius-sm); }
.modal-x:hover { background: var(--line); color: var(--navy); }
.modal-sm { max-width: 480px; }
.modal-body form { display: flex; flex-direction: column; gap: 16px; }

.grow { flex: 1 1 260px; min-width: 0; }
.col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gap-6 { gap: 6px; }
.gap-16 { gap: 16px; }
.wrap-any { overflow-wrap: anywhere; }
.inline { display: inline; }
.danger-text { color: var(--down-text); }
.ok-text { color: var(--ok-text); }
.mt-0 { margin: 0; }
.list-plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }

/* Status page */
.service-head { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.service-body[hidden] { display: none; }
.service-toggle .chevron { transition: transform 0.15s ease; }
.provider { font-weight: 600; }
.service-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.service-bars { padding: 0 24px 20px; }
.service-bars.open { padding-bottom: 18px; }
.check-name { min-width: 160px; }
.endpoint { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.feature-message { flex: 1 1 200px; min-width: 0; }
.timeline-text { color: var(--body); font-size: 14px; white-space: pre-line; }
.timeline-text.report { color: var(--muted); font-size: 13px; }
.when-col { flex: 0 0 170px; display: flex; flex-direction: column; }
.when-col-160 { flex: 0 0 160px; display: flex; flex-direction: column; }

/* Console */
.sidebar-nav svg { flex: none; }
.sidebar-foot form { margin: 0; }
.sidebar-foot .who { color: var(--on-accent); font-weight: 600; }
.overview-service { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 16px 24px; border-top: 1px solid var(--line); }
.overview-service:first-child { border-top: none; }
.overview-service-head { flex: 0 0 150px; display: flex; flex-direction: column; gap: 6px; }
.overview-service-head a { font-size: 15px; font-weight: 700; color: var(--navy); text-decoration: none; }
.overview-checks { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.overview-check { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.overview-check a { font-weight: 600; color: var(--navy); text-decoration: none; }
.cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; align-items: start; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.service-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.service-card-head h2 { font-size: 18px; }
.secret { font-family: var(--mono); font-size: 14px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow-wrap: anywhere; user-select: all; }
pre.snippet { margin: 0; padding: 12px 14px; background: var(--ground); border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.feature-card .check input[disabled] { opacity: 0.7; }
.feature-settings[hidden], .field[hidden] { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-grid .span-3 { grid-column: span 1; }
@media (min-width: 640px) { .form-grid.dns { grid-template-columns: 3fr 1fr; } }
.checkbox-list { display: flex; flex-direction: column; gap: 2px; }
.checkbox-list .hint { margin-left: 26px; }
.field-error { font-size: 12px; font-weight: 600; color: var(--down-text); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--down-dot); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.filters .field { min-width: 200px; }

/* Sign-in and the environment banner */
.environment { background: var(--deg-bg); color: var(--deg-text); font-size: 13px; padding: 8px 32px; border-bottom: 1px solid var(--deg-border); }
.gate { max-width: 440px; margin: 64px auto; padding: 0 16px; display: flex; flex-direction: column; gap: 20px; }
.gate .card { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.gate .brand img { height: 30px; }
.gate form { display: flex; flex-direction: column; gap: 16px; }

/* Without a script the service cards cannot be toggled, so they show open. */
.no-js .service-body[hidden] { display: flex !important; }
.no-js .service-toggle .chevron { display: none; }

/* Services and the check editor */
.endpoint-cell { max-width: 360px; }
.cell-right { text-align: right; }
.field-narrow { max-width: 160px; }
.form-card { width: 100%; max-width: 640px; }
.form-card form { display: flex; flex-direction: column; gap: 16px; }
.editor-card { display: flex; flex-direction: column; gap: 0; }
.report-lines { padding: 4px 24px 8px; }
.feature-line.flush { padding-left: 0; }
.bordered-top { border-top: 1px solid var(--line); }
.input-num { width: 100px; }
.grid-2.dns-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
@media (max-width: 640px) { .grid-2.dns-grid { grid-template-columns: 1fr; } }
.nowrap-row { flex-wrap: nowrap; }
.feature-head.check { min-height: 0; }
.feature-head input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue); }
.feature-settings[hidden], #sigexp-days[hidden] { display: none; }
.no-js .feature-settings[hidden] { display: grid !important; }
.no-js #sigexp-days[hidden] { display: flex !important; }
html:not(.no-js) .no-js-only { display: none; }
.card-row > a.grow { color: var(--body); text-decoration: none; }
.card-row > a.grow:hover { color: var(--navy); }

/* Incidents, maintenance and settings */
.right-cell { text-align: right; }
.editor-aside .card-row { padding: 12px 24px; gap: 6px 12px; flex-wrap: nowrap; }
.editor-aside .card-row .grow { flex: 1 1 160px; }
.table a.strong { text-decoration: none; }
@media (max-width: 640px) {
  .timeline-item { flex-wrap: wrap; gap: 4px 16px; }
  .timeline-when { flex-basis: 100%; }
}

.head-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px; min-width: 0; }
.console-body a { text-decoration: none; }
.console-body a:hover { text-decoration: underline; }
.legend { gap: 8px 10px; }

/* At phone width the 90 bars share what there is: no minimum, 1 px gaps. */
.bar { min-width: 0; }
@media (max-width: 640px) {
  .bars { gap: 1px; }
  .public-header-inner, .public-main, .public-footer-inner { padding-left: 16px; padding-right: 16px; }
  .console-body, .console-head { padding-left: 16px; padding-right: 16px; }
}
.public-main > * { min-width: 0; }
.service-toggle > * { min-width: 0; }
/* Wide tables scroll inside their card instead of widening the page. */
.console-body > *, .editor-main, .editor-aside, .card { min-width: 0; }
.table-wrap { max-width: 100%; }
/* A visually hidden label in a table stays inside the scrolling wrapper. */
.table-wrap { position: relative; }

/* Dark mode: the palette is swapped in tokens.css; only the blue logo on a
   dark header needs swapping here, for the white one. */
@media (prefers-color-scheme: dark) {
  .brand img { content: url("../img/peppol-logo-white.png"); }
}
