:root{font:16px system-ui,sans-serif;color:#14233a;background:#eff4f8}
*{box-sizing:border-box}
body{margin:0}
main{max-width:850px;margin:auto;padding:46px 22px}
header{margin-bottom:26px}
.brand{color:#145188;font-weight:850;letter-spacing:.18em}
h1{font-size:clamp(2rem,6vw,3.4rem);margin:.25em 0;letter-spacing:-.04em}
h2{font-size:1.1rem;margin:0}
article,.banner{border:1px solid #cad7e4;border-radius:16px;padding:20px;margin:12px 0;background:white}
.banner{font-weight:750}
.row{display:flex;justify-content:space-between;align-items:center;gap:12px}
.meta,footer{color:#4a5e75;font-size:.85rem}
.meta{margin-top:8px}
footer{margin-top:24px}
.pill{padding:5px 10px;border-radius:20px;font-size:.78rem;text-align:center}
.up{background:#d9f7e8;color:#155b3b}
.down{background:#ffe4e0;color:#8b231c}
.pending{background:#e6edf5;color:#354c66}
.bars{display:grid;grid-template-columns:repeat(30,1fr);gap:3px;margin-top:15px}
.bars span{height:23px;border-radius:3px}
.bars .up{background:#32aa76}
.bars .down{background:#d94d3b}
form{display:grid;gap:10px;margin-top:12px}
label{display:grid;gap:4px;font-weight:600}
input,select,button{font:inherit;padding:8px;border-radius:8px;border:1px solid #a7bbd1}
button{justify-self:start;background:#145188;color:white;cursor:pointer}
button.secondary{background:white;color:#8b231c}
.degraded{background:#fff0cc;color:#744b05}
summary{cursor:pointer}
summary h2::before{content:"› ";color:#145188}
details[open] summary h2::before{content:"⌄ "}
.check{border-top:1px solid #dbe4ed;padding:16px 0}
.check h3{margin:0;font-size:1rem}
fieldset{border:1px solid #cad7e4;border-radius:8px}
.enable{display:flex;align-items:center;margin-bottom:8px}
.timeline{padding-left:22px}
.timeline li{padding:.5em 0}
.message{white-space:pre-wrap;overflow-wrap:anywhere}
textarea{font:inherit;padding:8px;border:1px solid #a7bbd1;border-radius:8px;min-height:100px}
body{--accent:#145188}
.theme-forest{--accent:#246249}
.theme-plum{--accent:#784282}
.brand,a,summary h2::before{color:var(--accent)}
button{background:var(--accent)}
table{width:100%;border-collapse:collapse;margin-top:12px;font-size:.9rem}
td,th{text-align:left;border-bottom:1px solid #dbe4ed;padding:7px}
meter{width:min(22vw,140px);vertical-align:middle}

.status-dashboard{background:#fff;color:#172638}
.status-dashboard main{max-width:830px;padding-top:42px}
.status-dashboard header{border-bottom:1px solid #e1e8ef;padding-bottom:18px;margin-bottom:18px}
.status-dashboard .brand{display:inline-block;font-size:.82rem;letter-spacing:.16em}
.status-dashboard h1{font-size:clamp(2rem,5vw,3rem)}
.status-nav{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin:20px 0}
.status-nav a{font-weight:650;text-underline-offset:3px}
.subscribe-button{border:1px solid var(--accent);padding:8px 12px;border-radius:8px;text-decoration:none}
.status-dashboard .banner{padding:18px 20px;margin:22px 0 28px;border:none;border-radius:8px}
.status-dashboard .banner.up{background:#17634d;color:#fff}
.status-dashboard .banner.down{background:#8f312b;color:#fff}
.status-dashboard .banner.degraded{background:#fff0cc;color:#744b05}
.service-list{border:1px solid #dce4ed;border-radius:10px;margin:12px 0 26px}
.service-list article{border:0;border-radius:0;margin:0;padding:16px 18px}
.service-list article+article{border-top:1px solid #dce4ed}
.service-bars{margin-top:11px}
.service-bars span{height:18px}
.service-list .check{margin-top:10px}
.notice-list{border-top:1px solid #e1e8ef;padding-top:19px}
.status-dashboard a:focus-visible,.status-dashboard summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.maintenance-note,.banner.maintenance{background:#e8f2ff;color:#174572;border-radius:8px;padding:10px 12px}
.maintenance-note{font-size:.9rem;margin:10px 0 0}

.bars .recovered{background:#d28a20}
/* Smithies status layout */
body.status-dashboard,
body:has(main > .check) {
    background: #fff;
    color: #18293c;
}
:is(.status-dashboard, body:has(main > .check)) main {
    max-width: 780px;
    padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 28px);
}
:is(.status-dashboard, body:has(main > .check)) header {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #dae4ee;
}
:is(.status-dashboard, body:has(main > .check)) h1 {
    font-size: clamp(1.8rem, 5.5vw, 2.75rem);
    line-height: 1.15;
}
.status-dashboard .service-list {
    margin-top: 10px;
    border-color: #d5e0ea;
}
.status-dashboard .service-list article { padding: 14px 16px; }
:is(.status-dashboard, body:has(main > .check)) .check {
    padding: 14px 0 16px;
    border-top: 1px solid #e0e8f0;
}
:is(.status-dashboard, body:has(main > .check)) .bars {
    gap: clamp(2px, .45vw, 4px);
    margin-top: 10px;
}
:is(.status-dashboard, body:has(main > .check)) .bars span { height: 16px; }
:is(.status-dashboard, body:has(main > .check)) .pill {
    flex-shrink: 0;
    font-size: .75rem;
    font-weight: 650;
}
:is(.status-dashboard, body:has(main > .check)) .bars:has(.recovered) ~ p.meta:first-of-type {
    padding: 6px 9px;
    border-left: 3px solid #d28a20;
    border-radius: 3px;
    background: #fff6e5;
    color: #684206;
}
@media (max-width: 480px) {
    .status-dashboard .service-list article { padding: 12px; }
    :is(.status-dashboard, body:has(main > .check)) .row { gap: 6px; }
    :is(.status-dashboard, body:has(main > .check)) .row.meta { font-size: .72rem; }
    :is(.status-dashboard, body:has(main > .check)) .pill { max-width: 58%; }
}

.service-list article > details[open] ~ .service-overview-history { display: none; }

.smithies-brand-identity{display:flex;align-items:center;gap:16px}
.smithies-dashboard-logo{width:auto;max-width:112px;height:auto;max-height:64px;object-fit:contain;flex-shrink:0}
.smithies-dashboard-cover{width:100%;height:clamp(100px,24vw,206px);display:block;object-fit:cover;border-radius:10px;margin-bottom:18px}
@media(max-width:480px){.smithies-dashboard-logo{max-width:76px;max-height:48px}}

.smithies-dashboard-cover{height:auto;aspect-ratio:3/1;object-fit:contain}

.maintenance-brand-pair{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.maintenance-brand-pair img{max-width:158px;max-height:58px;object-fit:contain}
.maintenance-brand-pair img:last-child{width:52px;height:52px}

.smithies-status-page{background:#f5f8fc;color:#18293c;min-height:100vh}
.smithies-status-page main{max-width:860px;padding:clamp(20px,4vw,42px) clamp(14px,4vw,28px)}
.smithies-status-page .smithies-status-shared-header{margin:0 0 18px;padding:0 0 16px;border-bottom:1px solid #dce6ef}
.smithies-status-identity{display:flex;align-items:center;gap:14px}
.smithies-shared-logo{width:52px;height:52px;object-fit:contain;flex:none}
.smithies-status-identity .brand{font-size:.78rem;letter-spacing:.14em}
.smithies-status-identity h1{font-size:clamp(1.55rem,4vw,2.45rem);line-height:1.12;margin:.14em 0 0;overflow-wrap:anywhere}
.smithies-status-page .smithies-dashboard-cover{display:block;width:100%;height:auto;aspect-ratio:3/1;object-fit:contain;border-radius:10px;margin-bottom:18px}
.smithies-status-page.status-detail article{border-color:#dbe5ee;background:#fff;box-shadow:0 2px 8px #10233a0a}
.smithies-status-page :is(input,select,textarea){max-width:100%;min-height:40px}
.smithies-status-page :is(code,pre){overflow-wrap:anywhere}
.smithies-status-page pre{overflow:auto}
.smithies-status-page :is(a,button,input,select,textarea,summary):focus-visible{outline:2px solid #176084;outline-offset:3px}
@media(max-width:480px){.smithies-shared-logo{width:42px;height:42px}.smithies-status-identity{gap:10px}.smithies-status-page.status-detail article{padding:14px}}

/* Larger maintenance logos */
.maintenance-brand-pair img {
    max-width: 190px;
    max-height: 72px;
}
.maintenance-brand-pair img:last-child {
    width: 64px;
    height: 64px;
}
@media (max-width: 480px) {
    .maintenance-brand-pair img {
        max-width: 150px;
        max-height: 58px;
    }
    .maintenance-brand-pair img:last-child {
        width: 50px;
        height: 50px;
    }
}

/* Centred Smithies branding */
.smithies-status-page .smithies-status-shared-header {
    text-align: center;
    padding-bottom: clamp(16px, 3vw, 26px);
}
.smithies-status-page .smithies-status-identity {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.smithies-status-page .smithies-shared-logo {
    width: clamp(48px, 8vw, 64px);
    height: clamp(48px, 8vw, 64px);
}
.smithies-status-page .maintenance-brand-pair {
    justify-content: center;
    align-items: center;
    gap: clamp(12px, 3vw, 22px);
    margin: 0 auto 20px;
}
.smithies-status-page article:has(> .maintenance-brand-pair) {
    text-align: center;
}

.service-title{display:flex;align-items:center;gap:.7rem;min-width:0;overflow-wrap:anywhere}
.service-logo{width:44px;height:44px;object-fit:contain;flex:none;border-radius:8px;background:#fff}
.service-settings{border-top:1px solid #dce6ef;margin-top:.65rem}
.service-settings>summary{cursor:pointer;font-weight:600;padding:.75rem 0}
.service-settings>summary:focus-visible{outline:2px solid #176084;outline-offset:3px}
.service-settings[open]>summary{margin-bottom:.5rem}
/* Status admin workspace */
.admin-workspace .admin-dashboard-nav{display:flex;align-items:center;flex-wrap:wrap;gap:.65rem 1rem;margin:0 0 1.25rem}
.admin-workspace .admin-primary{display:inline-block;background:#164e73;color:#fff;border-radius:8px;padding:.65rem .9rem;text-decoration:none;font-weight:700}
.admin-workspace .admin-totals{list-style:none;padding:0;margin:0 0 1.25rem;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
.admin-workspace .admin-totals li{display:grid;gap:.2rem;background:#fff;color:#18293c;border:1px solid #dbe5ee;border-radius:10px;padding:.85rem;margin:0}
.admin-workspace .admin-totals strong{font-size:1.55rem;line-height:1.2}
.admin-workspace .admin-totals span{font-size:.9rem}
.admin-workspace .admin-service-header,.admin-workspace .admin-service-name{display:flex;align-items:center;gap:.75rem}
.admin-workspace .admin-service-header{justify-content:space-between;flex-wrap:wrap}
.admin-workspace .admin-service-name h3,.admin-workspace .admin-service-name p{margin:.15rem 0;overflow-wrap:anywhere}
.admin-workspace .admin-service-actions{margin:.75rem 0}
.admin-workspace details>summary{cursor:pointer;padding:.65rem 0;font-weight:650}
.admin-workspace .admin-service-card details{border-top:1px solid #dbe5ee;margin-top:.65rem}
.admin-workspace .admin-service-remove summary{font-size:.9rem}
.admin-workspace :is(a,button,summary):focus-visible{outline:2px solid #176084;outline-offset:3px}
@media(max-width:600px){.admin-workspace .admin-totals{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Status admin console */
body:has(.admin-console) main{
  box-sizing:border-box;width:100%;max-width:1320px;margin:auto;
  padding:24px clamp(16px,4vw,48px) 48px
}
body:has(.admin-console) main>header{margin-bottom:12px;text-align:left}
body:has(.admin-console) main>header .smithies-status-identity{
  display:flex;flex-direction:row;align-items:center;justify-content:flex-start;text-align:left
}
body:has(.admin-console) main>header h1{font-size:clamp(1.65rem,3vw,2.35rem)}
body:has(.admin-console) main>form[action$="/sign-out"]{
  display:flex;justify-content:flex-end;margin:0 0 12px
}
.admin-workspace.admin-console{
  display:grid;grid-template-columns:215px minmax(0,1fr);gap:24px;align-items:start
}
.admin-console .admin-dashboard-nav{
  display:flex;flex-direction:column;align-items:stretch;gap:4px;
  position:sticky;top:20px;padding:12px;margin:0;background:#10263b;border-radius:14px
}
.admin-console .admin-dashboard-nav a{
  display:block;color:#edf6ff;background:transparent;text-decoration:none;
  font-size:.92rem;font-weight:600;padding:10px 12px;border-radius:8px
}
.admin-console .admin-dashboard-nav a:hover,
.admin-console .admin-dashboard-nav .admin-console-current{background:#234961}
.admin-console .admin-console-content{min-width:0}
.admin-console .admin-totals li{
  border:1px solid #cfdeeb;border-radius:12px;padding:14px
}
.admin-console .admin-totals strong{font-size:1.8rem}
.admin-console .admin-service-card{
  display:grid;grid-template-columns:minmax(0,1.2fr) minmax(190px,.8fr) auto;
  align-items:center;gap:8px 16px;margin:0;padding:12px 14px;
  border:1px solid #dce6ef;border-bottom:0;border-radius:0;box-shadow:none
}
.admin-console .admin-service-card:first-of-type{border-radius:12px 12px 0 0}
.admin-console .admin-service-card:last-of-type{
  border-bottom:1px solid #dce6ef;border-radius:0 0 12px 12px
}
.admin-console .admin-service-card:only-of-type{border-radius:12px}
.admin-console .admin-service-header{grid-column:1;grid-row:1}
.admin-console .admin-service-name h3{font-size:1rem;line-height:1.25}
.admin-console .admin-service-name .meta{font-size:.82rem}
.admin-console .admin-service-actions{
  grid-column:2;grid-row:1;display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;margin:0
}
.admin-console .admin-service-actions :is(form,p){margin:0}
.admin-console .admin-service-actions a{font-weight:600}
.admin-console .admin-service-card .admin-console-settings{
  grid-column:3;grid-row:1;margin:0;border:0
}
.admin-console .admin-service-card .admin-console-settings[open]{
  grid-column:1 / -1;grid-row:auto;border-top:1px solid #dce6ef;padding-top:8px
}
.admin-console .admin-console-settings>summary{
  border:1px solid #cfdeeb;border-radius:8px;padding:8px 10px
}
.admin-console .admin-service-card>:not(.admin-service-header):not(.admin-service-actions):not(details){
  grid-column:1 / -1
}
@media(max-width:900px){
  .admin-workspace.admin-console{grid-template-columns:1fr;gap:16px}
  .admin-console .admin-dashboard-nav{position:static;flex-direction:row;flex-wrap:wrap}
}
@media(max-width:650px){
  .admin-console .admin-service-card{grid-template-columns:minmax(0,1fr) auto}
  .admin-console .admin-service-header{grid-column:1 / -1;grid-row:1}
  .admin-console .admin-service-actions{grid-column:1;grid-row:2}
  .admin-console .admin-service-card .admin-console-settings{grid-column:2;grid-row:2}
  .admin-console .admin-service-card .admin-console-settings[open]{grid-column:1 / -1;grid-row:auto}
}

/* Shared Status Admin shell */
.admin-console .admin-dashboard-nav form{margin:.5rem 0 0;padding-top:.5rem;border-top:1px solid #446077}
.admin-console .admin-dashboard-nav button{width:100%;text-align:left;background:#234961;color:#fff}
.admin-console-subpage>:first-child{margin-top:0}
.admin-console-subpage article{overflow-wrap:anywhere}
.admin-console-subpage textarea{width:100%;min-height:7rem}
.admin-console .admin-check-feedback{flex-basis:100%;margin:.35rem 0}
.admin-console button:disabled{cursor:wait;opacity:.65}

/* Smithies audit and public responsive layout */
.smithies-audit-scroll{
  max-width:100%;overflow:auto;background:#fff;color:#18293c;
  border:1px solid #dce6ef;border-radius:12px
}
.smithies-audit-scroll:focus-visible{outline:2px solid #176084;outline-offset:3px}
.smithies-audit-table{min-width:620px;width:100%;margin:0;border-collapse:collapse;font-size:.9rem}
.smithies-audit-table :is(th,td){padding:12px 14px;text-align:left;vertical-align:top;border-bottom:1px solid #e2ebf3}
.smithies-audit-table thead th{background:#edf4fa;color:#17364e;font-weight:700}
.smithies-audit-table tbody tr:nth-child(even){background:#f8fbfd}
.smithies-audit-table tbody tr:last-child>*{border-bottom:0}
.smithies-audit-table td:first-child{white-space:nowrap}
.smithies-audit-table tbody th{font-weight:600}
.smithies-audit-table summary{cursor:pointer;white-space:nowrap}
.smithies-audit-table code{display:block;max-width:22ch;overflow-wrap:anywhere;white-space:normal;margin-top:5px}

body.smithies-status-page:not(:has(.admin-workspace)) main{
  box-sizing:border-box;width:100%;max-width:1120px;
  padding:clamp(16px,3vw,34px) clamp(14px,4vw,36px) 42px
}
body.smithies-status-page:not(:has(.admin-workspace)) .smithies-status-shared-header{
  margin:0 0 16px;padding:0 0 14px
}
body.smithies-status-page:not(:has(.admin-workspace)) .smithies-status-identity{
  gap:12px;margin:0
}
body.smithies-status-page:not(:has(.admin-workspace)) .smithies-shared-logo{
  width:clamp(40px,6vw,58px);height:clamp(40px,6vw,58px)
}
body.smithies-status-page:not(:has(.admin-workspace)) .smithies-status-identity h1{
  font-size:clamp(1.65rem,4vw,2.6rem);line-height:1.12;margin:.15em 0 0
}
body.smithies-status-page.status-dashboard:not(:has(.admin-workspace)) .smithies-dashboard-cover{
  display:block;width:min(100%,720px,72svh);height:auto;
  aspect-ratio:3 / 1;object-fit:contain;margin:0 auto 14px
}
body.smithies-status-page:not(:has(.admin-workspace)) .status-nav{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin:0 0 16px
}
body.smithies-status-page:not(:has(.admin-workspace)) main :is(article,section,fieldset){min-width:0}
body.smithies-status-page:not(:has(.admin-workspace)) main :is(input,select,textarea,img){max-width:100%}
body.smithies-status-page:not(:has(.admin-workspace)) main :is(h1,h2,h3,p,pre,td,th){overflow-wrap:anywhere}
body.smithies-status-page:not(:has(.admin-workspace)) .bars{
  grid-template-columns:repeat(30,minmax(0,1fr));gap:clamp(1px,.35vw,4px)
}
@media(max-width:600px){
  body.smithies-status-page:not(:has(.admin-workspace)) main article{padding:14px}
  body.smithies-status-page:not(:has(.admin-workspace)) main .row{flex-wrap:wrap;gap:6px 10px}
  body.smithies-status-page:not(:has(.admin-workspace)) main table{
    display:block;max-width:100%;overflow-x:auto
  }
}

/* Larger service logos */
img.service-logo {
  width: 96px;
  height: 64px;
  object-fit: contain;
  flex: none;
}
@media (max-width: 600px) {
  img.service-logo {
    width: 72px;
    height: 52px;
  }
}

/* Responsive public service cards */
body.status-dashboard .service-list > article {
  min-width: 0;
  padding: 16px clamp(12px, 2vw, 22px);
}

body.status-dashboard .service-list > article > .row:first-child,
body.status-dashboard .service-list > article > details > summary.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
}

body.status-dashboard .service-list .service-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.28;
  overflow-wrap: anywhere;
}

body.status-dashboard .service-list .service-title > img.service-logo {
  width: 92px;
  height: 58px;
  object-fit: contain;
  flex: none;
}

body.status-dashboard .service-list > article > .row:first-child > .pill,
body.status-dashboard .service-list > article > details > summary.row > .pill {
  justify-self: end;
  max-width: 100%;
}

body.status-dashboard .service-list .service-bars {
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: clamp(1px, .4vw, 4px);
}

body.status-dashboard .service-list > article > :last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  body.status-dashboard .service-list > article > .row:first-child,
  body.status-dashboard .service-list > article > details > summary.row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  body.status-dashboard .service-list > article > .row:first-child > .pill,
  body.status-dashboard .service-list > article > details > summary.row > .pill {
    justify-self: start;
  }

  body.status-dashboard .service-list .service-title {
    gap: 9px;
  }

  body.status-dashboard .service-list .service-title > img.service-logo {
    width: clamp(56px, 18vw, 72px);
    height: 46px;
  }

  body.status-dashboard .service-list .service-bars span {
    height: 14px;
  }
}

/* Responsive email subscription form */
body main form[action="/subscribe"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-inline-size: 0;
  gap: 14px;
}
body main form[action="/subscribe"] label {
  grid-template-columns: minmax(0, 1fr);
  min-inline-size: 0;
}
body main form[action="/subscribe"] :is(input[type="email"], select) {
  box-sizing: border-box;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  min-block-size: 44px;
  font-size: max(16px, 1em);
}
body main form[action="/subscribe"] button {
  box-sizing: border-box;
  max-inline-size: 100%;
  min-block-size: 44px;
  white-space: normal;
  justify-self: start;
}
@media (max-width: 600px) {
  body main form[action="/subscribe"] button {
    inline-size: 100%;
    justify-self: stretch;
  }
}

/* Public status refinements */
.uptime-legend{display:flex;flex-wrap:wrap;gap:.35rem 1rem;font-size:.85rem;margin:.4rem 0}
.uptime-legend span{display:inline-flex;align-items:center;gap:.35rem}
.uptime-legend i{width:.8rem;height:.8rem;border-radius:3px;display:inline-block}
.legend-up{background:#32aa76}
.legend-down{background:#d94d3b}
.legend-recovered{background:#d99525}
.legend-empty{background:#e4eaf2}
.notice-email-preview{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}
