/* Ascot Client Portal v2: the website's design system (Ink + Horizon Amber, Outfit + Inter), dark only.
   No inline styles anywhere: every look lives here, so the strict CSP (style-src 'self') holds. */

@font-face {
  font-family: "Outfit Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/outfit-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2197, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2197, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0E1726;
  --ink-deep: #0a111d;
  --ink-2: #121d30;
  --ink-3: #1a283f;
  --amber: #EE9B2F;
  --amber-glow: #F6B04B;
  --text: #F4F6FA;
  --soft: #c9d1de;
  --muted: #A3AEC2;
  --line: rgba(163, 174, 194, 0.16);
  --green: #5fd39a;
  --red: #ff8a7a;
  --radius: 22px;
  --radius-in: 12px;
  --max: 1080px;
  --display: "Outfit Variable", "Outfit", system-ui, sans-serif;
  --body: "Inter Variable", "Inter", system-ui, sans-serif;
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --dock-h: 58px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; min-height: 100vh; background: var(--ink-deep); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
option { background: var(--ink-2); color: var(--text); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0 0 12px; color: var(--text); }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.1; letter-spacing: -0.03em; }
h3, h2.h3 { font-size: 1.15rem; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 12px; color: var(--muted); }
p:last-child { margin-bottom: 0; }
a { color: var(--amber-glow); }
img { max-width: 100%; height: auto; }
strong { color: var(--text); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 60; background: var(--amber); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }
.boot { padding: 30vh 16px 0; text-align: center; color: var(--muted); font-family: var(--display); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.78rem; }
.pre { white-space: pre-line; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.mt { margin-top: 18px; }
.hidden { display: none !important; }

/* static amber corner glow (the site's WebGL shader, made still) */
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; background:
  radial-gradient(60vmax 45vmax at 0% 100%, rgba(238,155,47,0.16), transparent 62%),
  radial-gradient(42vmax 32vmax at 100% 0%, rgba(246,176,75,0.08), transparent 60%); }
#app { position: relative; z-index: 1; }

/* type helpers from the site */
.accent { color: var(--amber); background: linear-gradient(100deg, #FFC56B 0%, var(--amber) 45%, #F08A1C 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.24em; font-size: 0.72rem; color: var(--amber-glow); margin: 0 0 14px; }
.lead { font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--soft); max-width: 640px; }

/* layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
main { padding: 28px 0 120px; }
.page-head { margin: 20px 0 30px; }
.stack { display: grid; gap: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.row > .grow { flex: 1 1 220px; min-width: 0; }
.section-title { font-family: var(--display); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 34px 0 14px; }

/* header */
.topbar { position: relative; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; display: block; transition: transform 0.7s var(--spring); }
.brand:hover img { transform: rotate(-14deg) scale(1.06); }
.brand-name { font-size: 1.02rem; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--body); font-weight: 500; font-size: 0.74rem; color: var(--muted); letter-spacing: 0.02em; }
.head-actions { display: flex; align-items: center; gap: 8px; }

/* the site's pill dock: under the header on desktop, fixed to the bottom on phones */
.dock { position: sticky; top: 12px; z-index: 25; display: flex; justify-content: center; margin: 0 auto; padding: 0 16px; pointer-events: none; }
.dock-inner { pointer-events: auto; display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 999px; background: rgba(10,17,29,0.55); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); border: 1px solid rgba(238,155,47,0.28); box-shadow: 0 18px 50px rgba(0,0,0,0.45), 0 0 34px rgba(238,155,47,0.14), inset 0 1px 0 rgba(255,255,255,0.08); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.dock-inner::-webkit-scrollbar { display: none; }
.dock a { padding: 10px 16px; border-radius: 999px; font-family: var(--display); font-weight: 500; font-size: 0.9rem; color: var(--text); text-decoration: none; white-space: nowrap; transition: background 0.25s, color 0.25s; }
.dock a:hover { background: rgba(238,155,47,0.14); color: var(--amber-glow); }
.dock a[aria-current="page"] { background: linear-gradient(180deg, #FFB648, var(--amber)); color: var(--ink); box-shadow: 0 6px 22px rgba(238,155,47,0.4); }
.subnav { display: flex; gap: 18px; justify-content: center; margin: 14px 0 0; font-size: 0.86rem; }
.subnav a { color: var(--muted); text-decoration: none; padding: 4px 2px; }
.subnav a:hover, .subnav a[aria-current="page"] { color: var(--amber-glow); }

/* buttons */
button { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 0.98rem; padding: 13px 24px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; color: var(--ink); background: linear-gradient(180deg, #FFB648, var(--amber)); box-shadow: 0 8px 30px rgba(238,155,47,0.3), inset 0 1px 0 rgba(255,255,255,0.35); transition: transform 0.45s var(--spring), box-shadow 0.45s var(--spring), background 0.3s ease; }
.btn:hover { background: linear-gradient(180deg, #FFC56B, var(--amber-glow)); box-shadow: 0 14px 44px rgba(238,155,47,0.5), inset 0 1px 0 rgba(255,255,255,0.45); }
.btn:active { transform: scale(0.97); transition-duration: 0.1s; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn .arrow { display: inline-block; transition: transform 0.45s var(--spring); }
.btn:hover .arrow { transform: translate(3px, -3px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { background: rgba(244,246,250,0.06); box-shadow: none; }
.btn-outline { background: transparent; color: var(--amber-glow); border: 1.5px solid rgba(238,155,47,0.75); box-shadow: none; }
.btn-outline:hover { background: rgba(238,155,47,0.1); box-shadow: 0 0 30px rgba(238,155,47,0.2); }
.btn-sm { padding: 8px 16px; font-size: 0.86rem; }
.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(255,138,122,0.45); box-shadow: none; }
.btn-danger:hover { background: rgba(255,138,122,0.1); box-shadow: none; }
.link-btn { background: none; border: 0; padding: 4px 2px; color: var(--amber-glow); cursor: pointer; font-family: var(--display); font-weight: 500; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* glass cards */
.card { position: relative; display: block; color: inherit; text-decoration: none; background: rgba(18,29,48,0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(238,155,47,0.16); border-radius: var(--radius); padding: 28px; transition: transform 0.6s var(--spring), border-color 0.4s ease, box-shadow 0.6s var(--spring); }
a.card:hover { transform: translateY(-4px); border-color: rgba(238,155,47,0.6); box-shadow: 0 24px 60px rgba(0,0,0,0.35), 0 0 40px rgba(238,155,47,0.16); }
.card h3 { margin-bottom: 6px; }
.card .meta { font-size: 0.86rem; color: var(--muted); margin: 0; }
.card .more { display: inline-flex; gap: 8px; margin-top: 14px; color: var(--amber-glow); font-family: var(--display); font-weight: 600; text-decoration: none; }
.card.empty { text-align: center; color: var(--muted); padding: 40px 28px; }
.tag { display: inline-block; font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber-glow); margin-bottom: 10px; }

/* stat cards */
.stat .n { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.03em; line-height: 1; color: var(--amber-glow); }
.stat .l { margin-top: 8px; color: var(--muted); font-size: 0.92rem; }

/* needs-you card: the one loud thing on Home */
.card.needs { background: linear-gradient(180deg, #FFC56B, var(--amber)); border-color: var(--amber-glow); color: var(--ink); box-shadow: 0 24px 70px rgba(238,155,47,0.3); }
.card.needs h2, .card.needs h3, .card.needs p, .card.needs strong, .card.needs .tag { color: var(--ink); }
.card.needs .tag { letter-spacing: 0.24em; }
.card.needs .btn { background: var(--ink); color: var(--text); box-shadow: 0 10px 30px rgba(14,23,38,0.35); }
.card.needs .btn:hover { background: var(--ink-3); }
.needs-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.needs-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid rgba(14,23,38,0.16); }

/* stage bar */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; counter-reset: stage; }
.stages li { position: relative; padding-top: 18px; font-family: var(--display); font-size: 0.84rem; color: var(--muted); line-height: 1.25; }
.stages li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 999px; background: rgba(163,174,194,0.22); }
.stages li.done { color: var(--soft); }
.stages li.done::before { background: rgba(238,155,47,0.55); }
.stages li.now { color: var(--amber-glow); font-weight: 600; }
.stages li.now::before { background: linear-gradient(90deg, #FFC56B, var(--amber)); box-shadow: 0 0 18px rgba(238,155,47,0.55); }

/* status pills */
.pill { display: inline-flex; align-items: center; white-space: nowrap; padding: 4px 12px; border-radius: 999px; font-family: var(--display); font-weight: 500; font-size: 0.8rem; line-height: 1.5; background: rgba(238,155,47,0.1); color: var(--amber-glow); border: 1px solid rgba(238,155,47,0.35); }
.pill.active { background: linear-gradient(180deg, #FFC56B, var(--amber)); color: var(--ink); border-color: var(--amber-glow); }
.pill.done { background: rgba(95,211,154,0.12); color: var(--green); border-color: rgba(95,211,154,0.4); }
.pill.off { background: rgba(163,174,194,0.08); color: var(--muted); border-color: var(--line); }

/* timeline */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 26px 34px; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: 6px; top: 8px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--amber); background: var(--ink-deep); }
.tl li::after { content: ""; position: absolute; left: 12px; top: 24px; bottom: 2px; width: 1px; background: var(--line); }
.tl li:last-child::after { display: none; }
.tl li.in_progress::before { background: var(--amber); box-shadow: 0 0 14px rgba(238,155,47,0.6); }
.tl li.done::before { background: var(--green); border-color: var(--green); }
.tl p { margin: 6px 0 0; }

/* my services */
.svc { display: flex; flex-direction: column; }
.svc .actions { margin-top: auto; padding-top: 18px; }
.svc.locked { background: rgba(18,29,48,0.4); border-style: dashed; }
.svc.locked h2 { color: var(--soft); }
.mt-s { margin-top: 8px; }
.reply { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-in); background: rgba(238,155,47,0.08); border-left: 3px solid var(--amber); }
.reply .tag { margin-bottom: 4px; }
.reply p:last-child { margin: 0; }
/* Request attachments (WS12) */
.files { margin-top: 12px; }
.files .tag { margin-bottom: 6px; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.file-list > li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius-in); border: 1px solid var(--line); background: rgba(10,17,29,0.45); }
.file-list .grow { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.file-name { color: var(--text); }
.files > .small { margin: 8px 0 0; }
.sheet-progress { margin: 0; min-height: 1.2em; }
.inbox-item { display: block; color: inherit; text-decoration: none; }
.inbox-item:hover strong { color: var(--amber-glow); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* list rows inside a card */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { padding: 16px 0; border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; padding-top: 0; }
.rows > li:last-child { padding-bottom: 0; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.login-card { width: min(460px, 100%); }
.login-card .brand { margin-bottom: 30px; }
.login-card h1 { font-size: clamp(2rem, 7vw, 2.6rem); }

/* forms */
form.stack { gap: 14px; }
label { font-size: 0.88rem; color: var(--muted); display: grid; gap: 7px; }
input, textarea, select { width: 100%; background: rgba(10,17,29,0.7); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-in); padding: 12px 14px; font: inherit; font-size: 1rem; transition: border-color 0.25s ease, box-shadow 0.25s ease; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(238,155,47,0.45); }
input[type="file"] { padding: 10px; }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; color: var(--soft); }
.check input { width: auto; }
.msg { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-in); background: rgba(238,155,47,0.1); border: 1px solid rgba(238,155,47,0.3); color: var(--soft); font-size: 0.92rem; }
.msg.err { background: rgba(255,138,122,0.08); border-color: rgba(255,138,122,0.4); color: var(--red); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }

/* admin */
.admin-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 0 0 8px; font-size: 0.84rem; color: var(--muted); }
.admin-badge { font-family: var(--display); letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.7rem; color: var(--ink); background: var(--amber-glow); padding: 3px 10px; border-radius: 999px; }
.client-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ed-section { scroll-margin-top: 90px; }
.ed-section + .ed-section { margin-top: 18px; }
.ed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ed-head h2 { margin: 0; font-size: 1.35rem; }
.ed-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ed-item .grow { flex: 1 1 220px; min-width: 0; }
.ed-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.ed-jump a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--soft); text-decoration: none; font-size: 0.86rem; }
.ed-jump a:hover { border-color: rgba(238,155,47,0.6); color: var(--amber-glow); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 0.88rem; }
dl.facts dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }

/* the one edit sheet (native dialog) */
dialog.sheet { width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid rgba(238,155,47,0.3); border-radius: var(--radius); background: var(--ink-2); color: var(--text); box-shadow: 0 40px 120px rgba(0,0,0,0.6); }
dialog.sheet::backdrop { background: rgba(5,9,16,0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.sheet[open] { animation: sheet-in 0.5s var(--spring); }
.sheet-body { padding: 28px; overflow-y: auto; max-height: calc(100vh - 42px); }
.sheet-body h2 { margin-bottom: 18px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }

/* entrance: staggered rise */
.rise { opacity: 0; transform: translateY(22px); filter: blur(6px); animation: rise 0.9s var(--spring) forwards; }
.rise.d1 { animation-delay: 0.05s; } .rise.d2 { animation-delay: 0.13s; } .rise.d3 { animation-delay: 0.21s; } .rise.d4 { animation-delay: 0.29s; } .rise.d5 { animation-delay: 0.37s; }
@keyframes rise { to { opacity: 1; transform: none; filter: blur(0); } }

/* footer */
.foot { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar .wrap { height: 66px; }
  .brand-name small { display: none; }
  main { padding: 8px 0 calc(var(--dock-h) + 56px); }
  .dock { position: fixed; top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); left: 0; right: 0; }
  .dock { padding: 0 8px; }
  .dock-inner { padding: 4px; }
  .dock a { padding: 9px 9px; font-size: 0.78rem; }
  .card { padding: 22px; }
  .stages { grid-template-columns: 1fr; gap: 10px; }
  .stages li { padding: 0 0 0 22px; }
  .stages li::before { right: auto; top: 6px; width: 10px; height: 10px; border-radius: 50%; }
  .form-grid { grid-template-columns: 1fr; }
  .sheet-body { padding: 22px; }
  .btn { padding: 13px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; transform: none; filter: none; }
  .btn, .card, .brand img, dialog.sheet[open] { transition: none; animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .dock-inner { background: var(--ink-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
  dialog.sheet::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(5,9,16,0.92); }
}

ol.grid, ul.grid { list-style: none; margin: 0; padding: 0; }
