/* Radiant Print customer portal. Brand: Radiant Blue #009FD8, ink #1A1A1A,
   white, ticket blue #E8F6FC. Archivo (wide) for display, Montserrat for text.
   The "works ticket": white cards with ruled spec fields and a blue top edge. */
:root {
    --blue: #009FD8;
    --blue-dark: #00729C;
    --ink: #1A1A1A;
    --ink-2: #4A5058;
    --line: #D9DEE4;
    --paper: #FFFFFF;
    --bg: #EEF3F7;
    --tint: #E8F6FC;
    --ok: #137A4B;
    --ok-bg: #E5F5EC;
    --warn: #8A5A00;
    --warn-bg: #FFF4DC;
    --bad: #B42318;
    --bad-bg: #FDECEA;
    --radius: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 400 16px/1.55 Montserrat, Arial, Helvetica, sans-serif;
    min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--blue-dark); }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: Archivo, Montserrat, Arial, sans-serif; font-stretch: 112%; font-weight: 800; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Header */
.topbar { background: var(--blue); color: #fff; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 10px; }
.brand img { display: block; height: 38px; width: auto; }
.who { text-align: right; line-height: 1.25; font-size: .85rem; }
.who-name { display: block; font-weight: 700; }
.who-biz { display: block; opacity: .9; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-bottom: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; padding: 10px 12px; border-radius: var(--radius) var(--radius) 0 0; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.15); }
.nav a[aria-current="page"] { background: var(--bg); color: var(--ink); }
.nav-right { margin-left: auto; }

.main { flex: 1; padding-top: 28px; padding-bottom: 48px; }
.foot { background: var(--ink); color: #cfd4da; font-size: .85rem; }
.foot a { color: #fff; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 16px; padding-bottom: 16px; }

/* Ticket card */
.ticket { background: var(--paper); border-top: 6px solid var(--blue); border-radius: 0 0 var(--radius) var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(26,26,26,.06); }
.ticket.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.ticket-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; margin-bottom: 14px; }
.ticket-head h1, .ticket-head h2 { margin: 0; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-dark); margin: 0 0 6px; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.grid { display: grid; gap: 20px; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-main { grid-template-columns: 1.6fr 1fr; } }

/* Ruled spec fields */
.fields { border-top: 1px solid var(--line); margin: 0 0 1em; }
.field { display: grid; grid-template-columns: 38% 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.field dt { font-weight: 600; color: var(--ink-2); }
.field dd { margin: 0; }

/* Tables as lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.row-link { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 4px; text-decoration: none; color: var(--ink); }
.row-link:hover { background: var(--tint); }
.row-title { font-weight: 600; }
.row-meta { font-size: .85rem; color: var(--ink-2); grid-column: 1; }
.row-side { grid-row: 1 / span 2; grid-column: 2; text-align: right; align-self: center; }
.empty { padding: 18px 4px; color: var(--ink-2); }

/* Badges */
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--blue-dark); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-grey { background: #EEF0F2; color: var(--ink-2); }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: var(--radius); border: 2px solid var(--blue); background: var(--blue); color: #fff; font: 700 .95rem Montserrat, Arial, sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--blue-dark); }
.btn-ghost:hover { background: var(--tint); color: var(--ink); }
.btn-ink { background: var(--ink); border-color: var(--ink); }
.btn-ink:hover { background: #000; border-color: #000; }
.btn-danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
.hint { font-weight: 400; color: var(--ink-2); font-size: .82rem; }
input[type=text], input[type=email], input[type=date], input[type=tel], input[type=number], select, textarea {
    width: 100%; font: 400 1rem Montserrat, Arial, sans-serif; color: var(--ink); background: #fff;
    border: 1px solid #B9C1CA; border-radius: var(--radius); padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(0,159,216,.35); border-color: var(--blue); }
.form-row { margin-bottom: 16px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; font-weight: 500; cursor: pointer; }
.choice:hover { border-color: var(--blue); }
.choice input { margin-top: 4px; accent-color: var(--blue); width: 18px; height: 18px; flex: none; }
.choice .price { margin-left: auto; font-weight: 700; white-space: nowrap; }
input[type=file] { font: inherit; max-width: 100%; }

.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 600; background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--bad-bg); color: var(--bad); }
.note { background: var(--tint); border-left: 4px solid var(--blue); padding: 12px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 1em; font-size: .92rem; }
.note-warn { background: var(--warn-bg); border-color: #E3A008; }

/* Price panel */
.price-big { font-family: Archivo, Montserrat, sans-serif; font-stretch: 112%; font-weight: 800; font-size: 2.4rem; line-height: 1; margin: 6px 0; }
.price-panel { background: var(--tint); border-radius: var(--radius); padding: 18px; }
.cat-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: 8px; }
.cat-btn { text-align: left; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; font: 600 .95rem Montserrat, sans-serif; cursor: pointer; color: var(--ink); }
.cat-btn small { display: block; color: var(--ink-2); font-weight: 500; margin-top: 2px; }
.cat-btn[aria-pressed="true"] { border-color: var(--blue); background: var(--tint); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 34px; }
.timeline li::before { content: ""; position: absolute; left: 9px; top: 22px; bottom: -2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.timeline .done .dot { background: var(--blue); border-color: var(--blue); }
.timeline .done .dot::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.timeline .current .dot { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,159,216,.2); }
.timeline .label { font-weight: 600; }
.timeline .todo .label { color: var(--ink-2); font-weight: 500; }
.timeline .when { display: block; font-size: .8rem; color: var(--ink-2); }

.stamp { display: inline-block; border: 3px solid var(--ok); color: var(--ok); font-family: Archivo, sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; transform: rotate(-4deg); }
.stamp-warn { border-color: var(--warn); color: var(--warn); }
.price-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.price-table td, .price-table th { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.price-table td.num, .price-table th.num { text-align: right; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
details summary { cursor: pointer; font-weight: 600; }

@media (max-width: 560px) {
    .who-biz { display: none; }
    .field { grid-template-columns: 1fr; gap: 2px; }
    .ticket { padding: 16px; }
    .price-big { font-size: 2rem; }
}

/* Small utilities (the CSP blocks inline style attributes) */
.u-rule { border-bottom: 1px solid var(--line); padding: 12px 0; }
.u-filerow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; justify-content: space-between; padding: 10px 4px; }
.u-mb6 { margin-bottom: 6px; } .u-mb8 { margin-bottom: 8px; } .u-mb10 { margin-bottom: 10px; } .u-mb16 { margin-bottom: 16px; }
.u-mt10 { margin-top: 10px; } .u-mt16 { margin-top: 16px; } .u-mt24 { margin-top: 24px; } .u-m0 { margin: 0; }
.u-w640 { max-width: 640px; } .u-full { width: 100%; } .u-block { display: block; }
.u-gap-cols { gap: 0 16px; } .u-bare { border: 0; padding: 0; margin: 0; }
.ticket-warn { border-top-color: #E3A008; } .eyebrow-warn { color: var(--warn); }
.btn-sm { min-height: 36px; padding: 6px 12px; }
