:root {
  color-scheme: light;
  --ink: #182735;
  --muted: #506371;
  --surface: #ffffff;
  --background: #f2f5f7;
  --border: #d9e2e8;
  --navy: #10273b;
  --accent: #09635f;
  --accent-hover: #074c49;
  --alert: #773029;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.6;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); }
a { color: var(--accent); text-underline-offset: .2em; }
h1, h2, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.35; }
h2 { font-size: 1.2rem; line-height: 1.45; }
p + p { margin-block-start: .4rem; }

.shell { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.narrow { max-width: 30rem; }
.top { color: #f5f9fc; background: var(--navy); border-block-end: .25rem solid #25877e; }
.top-inner { display: flex; align-items: center; gap: .75rem 1rem; flex-wrap: wrap; min-height: 4.25rem; padding-block: .65rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: inherit; text-decoration: none; font-size: 1.2rem; font-weight: 750; }
.brand-mark { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; background: #206d67; border-radius: .55rem; }
.account { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; min-width: 0; margin-inline-start: auto; }
.account bdi { overflow-wrap: anywhere; }
.top button.secondary { color: white; background: #233d52; border-color: #607688; }
.top button.secondary:hover { background: #345168; }
.preview { font-size: .8rem; color: #d0e4ef; }

main { padding-block: clamp(1.5rem, 4vw, 3rem) 3rem; }
.page-title { margin-block-end: 1.4rem; }
.page-title p { color: var(--muted); margin-block-start: .45rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: clamp(1rem, 3vw, 1.5rem); min-width: 0; }
.stack, .company form { display: grid; gap: 1rem; }
main > .card + .card, .companies { margin-block-start: 1rem; }
.login { display: grid; gap: 1.15rem; margin-block-start: .5rem; }
.company-link { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .7rem; text-decoration: none; color: var(--ink); }
.company-link:hover { border-color: var(--accent); }
.company-meta { display: flex; align-items: center; gap: .55rem .9rem; flex-wrap: wrap; color: var(--muted); margin-block-start: .5rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.company .section-title { margin-block-end: 1rem; }
.muted, .demo-accounts { color: var(--muted); }
.back { display: inline-block; padding-block: .3rem; margin-block-end: .4rem; }

.status { display: inline-flex; align-items: center; border-radius: 999px; background: #edf1f5; color: #374c5b; padding: .15rem .65rem; font-size: .86rem; font-weight: 650; }
.state-active { background: #dcefe8; color: #145641; }
.state-trial { background: #e4effb; color: #274e75; }
.state-expired, .state-suspended, .state-cancelled { background: #fbe8e4; color: var(--alert); }
.notice, .alert { padding: .7rem .9rem; border: 1px solid; border-radius: .65rem; }
.notice { margin-block-end: 1rem; color: #145641; background: #e9f6f0; border-color: #b7dcca; }
.alert { color: var(--alert); background: #fff2f0; border-color: #efc9c4; }

form { margin: 0; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); gap: .85rem; align-items: end; }
.inline-form { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.inline-form input { width: 7.2rem; max-width: 100%; }
.inline-form select { width: auto; max-width: 100%; }
.form-actions { grid-column: 1 / -1; }
label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 650; min-width: 0; }
input, select, button, .button { font: inherit; min-height: 2.75rem; border-radius: .55rem; }
input, select { width: 100%; min-width: 0; color: var(--ink); background: var(--surface); border: 1px solid #acbbc6; padding: .45rem .65rem; }
button, .button { border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; font-weight: 650; padding: .45rem .9rem; }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
button:hover, .button:hover { background: var(--accent-hover); }
button.secondary, .button.secondary { color: var(--accent); background: #edf7f5; border-color: #a8cbc6; }
button.secondary:hover, .button.secondary:hover { background: #dcefeb; }
:focus-visible { outline: 3px solid #b55909; outline-offset: 3px; }

details > summary { cursor: pointer; font-weight: 650; padding-block: .45rem; }
details > form, .demo-accounts > p:first-of-type { margin-block-start: .8rem; }
.card .disclosure { margin-block-start: .6rem; }
.lines { margin: .7rem 0 0; padding: 0; list-style: none; }
.item-line { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; padding-block: .65rem; border-block-start: 1px solid var(--border); min-width: 0; overflow-wrap: anywhere; }
.sku { display: block; font-size: .85rem; }

@media (max-width: 36rem) {
  .top-inner .account { width: 100%; justify-content: space-between; }
  .form-actions button { width: 100%; }
  .team-form { width: 100%; }
}
