:root {
  color-scheme: light;
  --brand: #e84a05;
  --brandDark: #bd3d03;
  --ink: #1f1f3f;
  --muted: #5c6873;
  --line: #d8dde1;
  --surface: #ffffff;
  --canvas: #f4f6f7;
  --focus: #006da5;
  --success: #176b3a;
  --warning: #8a5a00;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 14px; }
body { margin: 0; min-width: 320px; font-size: 15px; line-height: 1.55; }
a { color: #075985; text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
.skipLink { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .75rem 1rem; background: var(--ink); color: #fff; }
.skipLink:focus { top: 1rem; }
.siteHeader { background: var(--surface); border-bottom: 3px solid var(--brand); }
.headerInner { width: min(100% - 40px, 1180px); min-height: 78px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-grid; grid-template-columns: 54px auto; align-items: center; gap: .7rem; color: inherit; text-decoration: none; white-space: nowrap; }
.brand img { grid-row: 1; width: 54px; height: 48px; object-fit: contain; }
.brandContext { font-size: 12.48px; font-weight: 700; }
.mainNav { display: flex; align-items: center; gap: 20px; font-size: 15.2px; font-weight: 700; }
.mainNav a, .linkButton { color: var(--ink); text-decoration: none; }
.mainNav form { margin: 0; }
.linkButton { border: 0; padding: .5rem 0; background: transparent; }
.siteMain { width: min(100% - 3rem, 1240px); min-height: calc(100vh - 150px); margin: 0 auto; padding: 2rem 0 3rem; }
.siteFooter { min-height: 68px; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--line); font-size: .9rem; }
.welcome { padding: clamp(3rem, 9vw, 7rem) 0; max-width: 650px; }
.eyebrow { margin: 0 0 .35rem; color: var(--brand); font-size: .83rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.18; }
h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1rem; }
.welcome > p { margin: 1rem 0 2rem; font-size: 1.18rem; color: var(--muted); }
.verification { max-width: 560px; padding: clamp(2rem, 7vw, 5rem) 0; }
.corporateLogin { max-width: 460px; margin: clamp(1rem, 6vh, 4rem) auto; padding: 1.5rem 0; border-top: 3px solid var(--brand); }
.corporateLogin h1 { font-size: 1.85rem; }
.loginIntro { color: var(--muted); margin-bottom: 2rem; }
.corporateLogin .button { width: 100%; margin-top: .5rem; }
.loginFootnote { color: var(--muted); font-size: .85rem; }
.verification > p { color: var(--muted); }
.verification .field { max-width: 260px; margin: 2rem 0 1.2rem; }
.verification input { letter-spacing: .3em; font-size: 1.5rem; }
.primaryActions, .formActions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: .68rem 1.1rem; border: 2px solid var(--ink); border-radius: .28rem; font-weight: 750; text-decoration: none; }
.buttonPrimary { background: var(--brand); border-color: var(--brand); color: #fff; }
.buttonPrimary:hover { background: var(--brandDark); border-color: var(--brandDark); }
.buttonSecondary { background: var(--surface); color: var(--ink); }
.buttonDanger { background: #fff; border-color: #a1121e; color: #a1121e; }
.buttonDanger:hover { background: #fff0f0; }
.textAction { padding: .7rem; font-weight: 700; }
.button:focus-visible, .brand:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.pageHeader { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; }
.compactHeader { margin-bottom: 1.4rem; }
.ticketList { border-top: 1px solid var(--line); }
.ticketRow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, .45fr) auto; align-items: center; gap: 1.5rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.ticketRow h2 { margin: .15rem 0; font-size: 1.12rem; }
.ticketRow h2 a { color: var(--ink); text-decoration: none; }
.ticketMeta, .ticketId, .timelineDate { margin: 0; color: var(--muted); font-size: .87rem; }
.ticketId { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ticketState { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; color: var(--muted); font-size: .84rem; }
.statusBadge { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .55rem; border-radius: .2rem; background: #e8edf0; color: #33414e; font-size: .86rem; font-weight: 750; }
.statusNEW, .statusREAD { background: #e6f1f8; color: #075985; }
.statusIN_PROGRESS, .statusINVESTIGATING, .statusREOPENED { background: #fff0dc; color: #8a4500; }
.statusWAITING_REQUESTER, .statusWAITING_THIRD_PARTY { background: #fff7cc; color: #705000; }
.statusVALIDATION { background: #f0e9f8; color: #593786; }
.statusRESOLVED { background: #e3f3e9; color: var(--success); }
.rowAction { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
.emptyState { max-width: 650px; padding: 2.5rem 0; border-top: 1px solid var(--line); }
.emptyState h2 { margin-top: 0; }
.ticketForm { background: var(--surface); border: 1px solid var(--line); }
.ticketForm fieldset { margin: 0; padding: 1.75rem; border: 0; border-bottom: 1px solid var(--line); }
.ticketForm legend { padding: 0; font-size: 1.22rem; font-weight: 800; }
.ticketCompose { border: 0; background: transparent; max-width: none; margin-inline: auto; }
@media (min-width: 1000px) {
  .ticketCompose { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); gap: 1.5rem; align-items: start; }
  .ticketCompose fieldset:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  .ticketCompose fieldset:nth-of-type(2) { grid-column: 1; grid-row: 2; }
  .ticketCompose fieldset:nth-of-type(3) { grid-column: 2; grid-row: 1; }
  .ticketCompose fieldset:nth-of-type(4) { grid-column: 2; grid-row: 2; }
  .ticketCompose fieldset:nth-of-type(n+3) .twoColumns { grid-template-columns: 1fr; gap: 0; }
  .ticketCompose .formActions { grid-column: 1 / -1; }
}
.ticketCompose fieldset { background: #fff; margin: 0 0 1.8rem; padding: 1.25rem 2rem 1.5rem; border: 0; border-top: 2px solid var(--ink); }
.ticketCompose legend { background: var(--canvas); padding: 0 .7rem 0 0; font-size: 1rem; }
.sectionNumber { color: var(--brand); margin-right: .5rem; font-size: .8rem; font-variant-numeric: tabular-nums; }
.ticketCompose .field { margin: .8rem 0; }
.ticketCompose .fieldGrid { gap: 1.5rem; }
.ticketCompose .field label:not(.choice) { font-size: .92rem; }
.ticketCompose .field input:not([type="radio"]):not([type="checkbox"]), .ticketCompose .field select, .ticketCompose .field textarea { border-color: #c0c8d0; border-radius: 0; min-height: 44px; }
.ticketCompose .field textarea { min-height: 190px; border-left: 3px solid var(--brand); }
.ticketCompose .formActions { padding: 0; justify-content: flex-end; }
.ticketCompose .evidenceField { border-top: 0; padding-top: .5rem; margin-top: 1rem; }
.ticketCompose .evidenceHeading { border-left: 3px solid var(--brand); padding-left: 1rem; }
.ticketCompose .evidencePicker { color: #fff; background: var(--ink); border: 0; padding-inline: 1rem; }
.ticketCompose .evidencePicker:hover { background: #34345a; }
@media (max-width: 600px) { .ticketCompose fieldset { padding-inline: 1rem; } }
.sectionHint, .fieldHelp { color: var(--muted); }
.sectionHint { margin: .3rem 0 1rem; }
.fieldGrid { display: grid; gap: 1.25rem; }
.twoColumns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { margin: 1rem 0; }
.field label:not(.choice), .fieldLabel, .replyForm label { display: block; margin-bottom: .38rem; font-weight: 750; }
.field label span { color: var(--muted); font-size: .88rem; font-weight: 500; }
.field input:not([type="radio"]):not([type="checkbox"]), .field select, .field textarea, .replyForm textarea { width: 100%; min-height: 48px; padding: .65rem .75rem; border: 1px solid #89949d; border-radius: .2rem; background: #fff; color: var(--ink); }
.field textarea, .replyForm textarea { resize: vertical; }
.fieldHelp { margin: .3rem 0 0; font-size: .88rem; }
.choice { display: inline-flex; align-items: center; min-height: 44px; margin-right: 1.2rem; gap: .45rem; }
.choice input { width: 20px; height: 20px; }
.choiceBlock { margin-top: .45rem; font-size: .9rem; }
.fieldError { margin: .35rem 0 0; color: #a1121e; font-weight: 700; }
.formActions { padding: 1.5rem 1.75rem; }
.evidenceField { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.evidenceHeading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.evidenceHeading h2 { margin: 0; font-size: 1rem; }
.evidenceHeading h2 span { color: var(--muted); font-size: .88rem; font-weight: 500; }
.evidencePicker { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: .55rem .8rem; border: 1px solid var(--ink); color: var(--ink); font-size: .9rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.evidencePicker:hover { background: #f3f5f7; }
.evidencePicker:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.evidencePicker input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.evidenceFiles { list-style: none; padding: 0; margin: .75rem 0; }
.evidenceFiles li { display: flex; align-items: center; gap: .8rem; min-height: 48px; border-bottom: 1px solid var(--line); }
.evidenceFiles li > span { flex: 1; overflow-wrap: anywhere; min-width: 0; }
.evidenceFiles small { color: var(--muted); white-space: nowrap; }
.evidenceFiles button { min-height: 44px; padding: .4rem; border: 0; background: transparent; color: #a1121e; cursor: pointer; font: inherit; font-size: .85rem; }
@media (max-width: 600px) { .evidenceHeading { align-items: flex-start; flex-direction: column; } }
.errorSummary { margin-bottom: 1rem; padding: 1rem 1.2rem; border: 2px solid #a1121e; background: #fff6f6; }
.errorSummary h2 { margin: 0; }
.flashRegion { margin-bottom: 1.25rem; }
.flashMessage { margin: 0; padding: .85rem 1rem; border-left: 4px solid var(--focus); background: #eaf5fb; }
.flashSuccess { border-color: var(--success); background: #e8f6ed; }
.flashError { border-color: #a1121e; background: #fff0f0; }
.backLink { display: inline-block; margin-bottom: 1.3rem; font-weight: 700; }
.ticketHeader { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.ticketHeader h1 { margin: .25rem 0 .45rem; font-size: clamp(1.75rem, 3vw, 2.45rem); }
.detailLayout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 3rem; padding-top: 2rem; }
.detailPrimary > h2 { margin-top: 0; }
.preserveLines { white-space: pre-wrap; }
.timeline { margin-top: 2.5rem; }
.timelineItem { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: .8rem; padding: 0 0 1.7rem; }
.timelineItem::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: -4px; width: 2px; background: var(--line); }
.timelineItem:last-child::before { display: none; }
.timelineMarker { position: relative; z-index: 1; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--brand); }
.timelineItem h3 { margin: .15rem 0 .3rem; }
.replyForm, .resolutionCheck { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.replyForm .button { margin-top: .7rem; }
.attachmentList { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.attachmentList li + li { margin-top: .45rem; }
.attachmentList span { color: var(--muted); font-size: .85rem; }
.ticketFacts dl { margin: 0; padding: 1rem 1.2rem; border-left: 3px solid var(--brand); background: var(--surface); }
.ticketFacts dl div + div { margin-top: 1rem; }
.ticketFacts dt { color: var(--muted); font-size: .84rem; font-weight: 700; }
.ticketFacts dd { margin: .1rem 0 0; }
.errorPage, .legalPage { max-width: 760px; }
.errorPage { padding: 4rem 0; }
.legalPage h2 { margin-top: 2rem; }
.noticePending { padding: 1rem; border-left: 4px solid var(--warning); background: #fff7e5; }
.operationsSummary { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem 2rem; padding: 1.5rem 0 2rem; border-block: 1px solid var(--line); }
.boardSummary { padding: 1rem 0; border-block: 1px solid var(--line); color: var(--muted); }
.boardSummary strong { color: var(--ink); }
.operationsSummary h2 { grid-column: 1 / -1; margin: 0; }
.primaryMetric { margin: 0; font-size: 1rem; }
.primaryMetric strong { display: block; font-size: 2.6rem; line-height: 1; }
.operationsSummary dl { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin: 0; }
.operationsSummary dl div { min-width: 120px; }
.operationsSummary dt { color: var(--muted); font-size: .85rem; }
.operationsSummary dd { margin: 0; font-size: 1.4rem; font-weight: 800; }
.recentWork { margin-top: 2.2rem; }
.reportingSection { margin-top: 2.5rem; }
.reportingSection > p { color: var(--muted); }
.reportingGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2.5rem; }
.reportingGrid > div { border-top: 3px solid var(--brand); }
.reportingGrid dl { margin: 0; }
.reportingGrid dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.reportingGrid dd { margin: 0; font-weight: 800; }
.sectionHeading { display: flex; align-items: center; justify-content: space-between; }
.adminTableWrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.adminTable { width: 100%; border-collapse: collapse; text-align: left; }
.adminTable th, .adminTable td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adminTable th { background: #edf1f3; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.adminTable td span:not(.statusBadge) { display: block; color: var(--muted); font-size: .8rem; }
.inlineForm { display: flex; align-items: center; gap: .5rem; }
.inlineForm input { min-height: 42px; padding: .45rem; border: 1px solid #89949d; }
.inlineForm .button { min-height: 42px; padding-block: .4rem; }
.visuallyHidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.filterBar { display: grid; grid-template-columns: minmax(220px, 1fr) 220px 220px auto; align-items: end; gap: 1rem; margin-bottom: 1.25rem; padding: 1rem; border: 1px solid var(--line); background: var(--surface); }
.filterBar label, .adminActions label { display: block; margin-bottom: .3rem; font-size: .85rem; font-weight: 700; }
.filterBar input, .filterBar select, .adminActions select { width: 100%; min-height: 46px; padding: .55rem; border: 1px solid #89949d; background: #fff; }
.adminDetailLayout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 3rem; padding-top: 2rem; }
.adminActions { align-self: start; padding: 1.2rem; border-left: 3px solid var(--brand); background: var(--surface); }
.adminActions h2 { margin-top: 0; }
.adminActions .button { width: 100%; margin-top: .8rem; }
.adminNoteForm { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.adminNoteForm textarea { width: 100%; resize: vertical; border: 1px solid #89949d; }
.eventPayload { max-width: 100%; overflow-x: auto; padding: .7rem; background: #edf1f3; font-size: .82rem; white-space: pre-wrap; }

@media (max-width: 800px) {
  .headerInner { min-height: auto; padding: .8rem 0; align-items: flex-start; }
  .mainNav { flex-wrap: wrap; justify-content: flex-end; gap: .5rem 1rem; }
  .ticketRow { grid-template-columns: 1fr auto; }
  .ticketState { grid-column: 1; }
  .rowAction { grid-column: 2; grid-row: 1 / span 2; }
  .detailLayout { grid-template-columns: 1fr; gap: 1.5rem; }
  .ticketFacts { grid-row: 1; }
  .ticketFacts dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .ticketFacts dl div + div { margin-top: 0; }
  .filterBar { grid-template-columns: 1fr 1fr; }
  .adminDetailLayout { grid-template-columns: 1fr; }
  .adminActions { grid-row: 1; }
  .reportingGrid { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  body { font-size: 16px; }
  .headerInner, .siteMain { width: min(100% - 2rem, 1080px); }
  .headerInner, .pageHeader, .ticketHeader { align-items: stretch; flex-direction: column; }
  .mainNav { justify-content: flex-start; }
  .pageHeader .button { align-self: flex-start; }
  .twoColumns { grid-template-columns: 1fr; gap: 0; }
  .ticketForm fieldset, .formActions { padding: 1.2rem; }
  .ticketRow { grid-template-columns: 1fr; gap: .8rem; }
  .rowAction, .ticketState { grid-column: 1; grid-row: auto; }
  .ticketFacts dl { grid-template-columns: 1fr; }
  .ticketFacts dl div + div { margin-top: .8rem; }
  .primaryActions .button { width: 100%; }
  .operationsSummary { grid-template-columns: 1fr; }
  .operationsSummary h2 { grid-column: 1; }
  .filterBar { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
