@font-face {
  font-family: Barlow;
  src: url("/assets/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url("/assets/barlow-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #09274e;
  --ink: #0b2241;
  --muted: #40536a;
  --blue: #224f83;
  --line: #bacbdc;
  --page: #eef2f6;
  --white: #fff;
  --tint: #e6eff8;
  --warn: #7e301e;
  --warn-bg: #fff4e9;
  font-family: Barlow, Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2369a4; outline-offset: 4px; }
body { margin: 0; line-height: 1.5; }
h1, h2, h3, p, ul, ol, dl { margin: 0; }
h1, h2, h3 { line-height: 1.13; }
h1, h2 { font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif; }
h1 { font-size: clamp(2.3rem, 6vw, 3.5rem); }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.15rem; }
a { color: var(--blue); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
.shell { width: min(100% - 2.5rem, 1100px); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 5; transform: translateY(-160%); background: white; padding: .6rem; }
.skip:not(:focus) { clip-path: inset(50%); }
.skip:focus { transform: none; }
.masthead { border-top: .32rem solid var(--navy); background: var(--white); border-bottom: 1px solid var(--line); }
.masthead-inner, .brand, .session-controls { display: flex; align-items: center; gap: .85rem; }
.masthead-inner { justify-content: space-between; min-height: 5.7rem; padding-block: .5rem; }
.brand { font: 700 1.45rem/1 "Barlow Condensed", Arial, sans-serif; }
.brand img { display: block; width: 4.5rem; height: 4.5rem; border-radius: 50%; }
.session-controls { font-size: .95rem; overflow-wrap: anywhere; }
#main { padding-block: 2.5rem 3.25rem; min-height: min(70vh, 38rem); }
.footer { display: flex; flex-wrap: wrap; gap: .35rem 1rem; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); padding-block: 1rem; font-size: .9rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: .8rem; padding: clamp(1rem, 3vw, 1.8rem); min-width: 0; }
.auth-card { width: min(100%, 31rem); margin-inline: auto; border-top: .34rem solid var(--navy); }
.workspace-auth { border-top: 1px solid var(--line); padding-top: .85rem; }
.workspace-auth .button { text-decoration: none; }
.stack, form { display: grid; gap: 1rem; }
.tight { gap: .55rem; }
.fields { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.columns { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.muted { color: var(--muted); }
.quiet { font-size: .9rem; color: var(--muted); }
.actions, .row-head, .toolbar, .tabs { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.row-head { justify-content: space-between; }
.toolbar { align-items: end; }
.toolbar .field { min-width: min(100%, 11rem); }
.tabs { gap: .25rem .6rem; border-bottom: 1px solid var(--line); }
.tabs button { background: transparent; color: var(--navy); font-weight: 700; border: 0; border-bottom: .2rem solid transparent; padding: .65rem .6rem; }
.tabs button[aria-current="page"] { border-color: var(--navy); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.65rem; width: fit-content; max-width: 100%; padding: .47rem .9rem; border: 1px solid var(--navy); border-radius: .35rem; background: var(--navy); color: white; font-weight: 700; text-align: center; }
.button:hover { background: #163d6c; }
.button-outline { background: white; border-color: var(--line); color: var(--navy); }
.button-outline:hover { background: var(--tint); }
.link-button { background: none; border: 0; padding: 0; text-align: left; color: var(--blue); text-decoration: underline; text-underline-offset: .2em; }
label, .field { display: grid; gap: .3rem; font-weight: 700; min-width: 0; }
input, select, textarea { width: 100%; border: 1px solid #849bb2; border-radius: .32rem; padding: .55rem .65rem; color: var(--ink); background: white; min-height: 2.65rem; }
textarea { min-height: 7.5rem; resize: vertical; }
input[type="checkbox"] { width: 1rem; min-height: auto; height: 1rem; accent-color: var(--navy); }
.checkbox { display: flex; gap: .45rem; align-items: center; font-weight: 400; }
.checks { border: 1px solid var(--line); border-radius: .35rem; padding: .65rem .7rem; min-width: 0; margin: 0; }
legend { font-weight: 700; padding-inline: .2rem; }
.notice { margin-bottom: 1.1rem; border: 1px solid #93aac0; background: var(--tint); border-radius: .35rem; padding: .75rem 1rem; overflow-wrap: anywhere; }
.notice-error { background: var(--warn-bg); color: var(--warn); border-color: #c3937c; }
.qr { display: block; width: min(100%, 12rem); height: auto; }
.setup-key { overflow-wrap: anywhere; font-family: monospace; }
.queue { display: grid; gap: .65rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.queue button { min-height: 3.3rem; width: 100%; }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: .7rem .55rem; overflow-wrap: anywhere; vertical-align: top; }
th { color: var(--muted); font-size: .88rem; }
td:first-child, td:last-child { white-space: nowrap; }
.status { display: inline-flex; padding: .17rem .52rem; border-radius: .35rem; background: var(--tint); color: var(--navy); font-size: .9rem; font-weight: 700; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: .55rem 1.5rem; }
.ticket-meta dt { color: var(--muted); font-size: .88rem; }
.ticket-meta dd { margin: 0; font-weight: 700; }
.message { border-left: .2rem solid var(--line); padding: .25rem 0 .25rem .8rem; }
.private-card { border-color: #c3987f; background: #fffaf4; }
.body-text { white-space: pre-wrap; overflow-wrap: anywhere; }
summary { cursor: pointer; font-weight: 700; color: var(--blue); }
details > .stack { margin-top: .75rem; }
.crm-record { overflow-wrap: anywhere; }
.crm-summary { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .25rem .65rem; vertical-align: top; max-width: calc(100% - 1.3rem); }
.crm-summary strong { color: var(--ink); }
.crm-record h2 { font: 700 1rem/1.3 Barlow, Arial, sans-serif; }
.contact { border-top: 1px solid var(--line); padding-top: .7rem; overflow-wrap: anywhere; }
.invite-link { font-family: monospace; }

@media (max-width: 620px) {
  .shell { width: calc(100% - 1.5rem); }
  .brand { font-size: 1.2rem; }
  .brand img { width: 3.55rem; height: 3.55rem; }
  .session-controls { flex-direction: column; align-items: flex-end; gap: .2rem; }
  .session-controls .button { min-height: 2.15rem; }
  #main { padding-block: 1.4rem 2.4rem; }
  .columns, .fields, .queue { grid-template-columns: 1fr; }
  .queue { gap: .4rem; }
  .queue button { min-height: 2.65rem; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .2rem .65rem;
    padding-block: .75rem;
    border-top: 1px solid var(--line);
  }
  tbody td { border: 0; padding: 0; }
  tbody td:nth-child(1) { grid-row: 1; grid-column: 1; font-weight: 700; }
  tbody td:nth-child(2) { grid-column: 1 / -1; font-weight: 700; font-size: 1.1rem; }
  tbody td:nth-child(3), tbody td:nth-child(4), tbody td:nth-child(6) {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: .95rem;
    white-space: normal;
  }
  tbody td:nth-child(5) { grid-row: 1; grid-column: 2; justify-self: end; }
}

.invite-dialog { width: min(calc(100% - 1.5rem), 31rem); color: var(--ink); }
.invite-dialog::backdrop { background: rgb(9 39 78 / 55%); }

.guided-quote {
  width: min(calc(100% - 2rem), 62rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: .75rem;
}
.guided-quote::backdrop { background: #09274e; }
.guided-quote-content { padding: clamp(1rem, 3vw, 2rem); }
.guided-quote-error { color: #8a2718; font-weight: 700; }
