/* ENRSI public site — palette sampled from the ENRSI logo */
:root {
  --navy-900: #0c1830;
  --navy-800: #12244a;
  --navy: #1d3f72;
  --blue: #245a8a;
  --teal: #2a8c9c;
  --aqua: #45b5b2;
  --ink: #0f1b33;
  --body: #3b4760;
  --muted: #5d6880;
  --line: #e2e7ef;
  --bg: #ffffff;
  --tint: #f3f7fa;
  --grad: linear-gradient(120deg, var(--navy) 0%, var(--teal) 60%, var(--aqua) 100%);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 27, 51, .05), 0 8px 28px rgba(15, 27, 51, .07);
  --font-head: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 17px; line-height: 1.65; color: var(--body); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3, .h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; }
.eyebrow { font-family: var(--font-head); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-bottom: .9rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font-family: var(--font-head); font-weight: 700; font-size: .95rem; padding: .95em 1.6em; border-radius: 999px; border: 0; background: var(--grad); background-size: 140% 100%; color: #fff; text-decoration: none; cursor: pointer; box-shadow: 0 6px 20px rgba(42, 140, 156, .28); transition: transform .15s, box-shadow .15s, background-position .3s; }
.btn:hover { transform: translateY(-1px); background-position: 100% 0; box-shadow: 0 10px 26px rgba(42, 140, 156, .36); }
.btn-sm { padding: .65em 1.2em; font-size: .88rem; }
.btn-ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--teal); background: transparent; }
.btn-light { background: #fff; color: var(--navy); box-shadow: none; }
.btn-light:hover { background: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.btn-block { width: 100%; }
.text-link { font-family: var(--font-head); font-weight: 700; font-size: .95rem; color: var(--teal); text-decoration: none; }
.text-link:hover { color: var(--navy); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(15, 27, 51, .05); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand img { height: 50px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none; position: relative; padding: 6px 0; }
.nav a:not(.btn)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.nav a:not(.btn):hover::after, .nav a.active::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 6px 0; border-radius: 2px; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(600px 400px at 85% 35%, rgba(69, 181, 178, .18), transparent 70%),
  radial-gradient(500px 380px at 10% 0%, rgba(29, 63, 114, .10), transparent 70%),
  linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
  linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); opacity: .9; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { background: linear-gradient(120deg, var(--ink) 30%, var(--navy) 55%, var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 480px; justify-self: center; width: 100%; }
.orbit { position: absolute; border-radius: 50%; border: 1px dashed rgba(42, 140, 156, .35); }
.orbit-1 { inset: 8%; animation: spin 60s linear infinite; }
.orbit-2 { inset: 22%; border-style: solid; border-color: rgba(29, 63, 114, .12); }
.hero-mark { position: absolute; inset: 30%; display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: 0 20px 60px rgba(29, 63, 114, .18); }
.hero-mark img { width: 62%; }
.chip { position: absolute; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px 8px 8px; font-family: var(--font-head); font-weight: 700; font-size: .85rem; color: var(--ink); box-shadow: var(--shadow); white-space: nowrap; animation: float 6s ease-in-out infinite; }
.chip-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; }
.chip-icon .icon { width: 17px; height: 17px; }
.chip-1 { top: 6%; left: 2%; }
.chip-2 { top: 22%; right: -4%; animation-delay: -1.5s; }
.chip-3 { bottom: 18%; left: -6%; animation-delay: -3s; }
.chip-4 { bottom: 4%; right: 4%; animation-delay: -4.5s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .orbit-1, .chip { animation: none; } html { scroll-behavior: auto; } }

/* Sections */
.section { padding: 96px 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--navy-900); background-image: radial-gradient(700px 400px at 90% 0%, rgba(69, 181, 178, .16), transparent 70%), radial-gradient(600px 400px at 0% 100%, rgba(36, 90, 138, .3), transparent 70%); color: #c4cee0; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { color: var(--aqua); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.row-head { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.page-hero { padding: 72px 0 56px; background: var(--tint); background-image: radial-gradient(500px 300px at 90% 10%, rgba(69, 181, 178, .16), transparent 70%); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 820px; }
.page-hero-title { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.page-hero-title h1 { margin: 0; }
.crumb { display: inline-block; font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--teal); margin-bottom: 20px; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-decoration: none; color: var(--body); transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card p { font-size: .97rem; color: var(--muted); flex: 1; }
.card-icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, rgba(29, 63, 114, .1), rgba(69, 181, 178, .18)); color: var(--navy); margin-bottom: 20px; }
.card-icon .icon { width: 26px; height: 26px; }
.card-icon-lg { width: 64px; height: 64px; margin: 0; }
.card-icon-lg .icon { width: 32px; height: 32px; }
.card-link { font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--teal); }
.post-card time { font-size: .82rem; font-weight: 600; color: var(--teal); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .06em; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; counter-reset: s; }
.step { padding: 28px; border-radius: var(--radius); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.step p { margin: 0; font-size: .97rem; }
.step-num { display: inline-block; font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; background: linear-gradient(120deg, #6fa8dc, var(--aqua)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 14px; }

/* Split / values */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.value-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.value-list li { padding: 22px 24px 18px 26px; border-radius: var(--radius); background: var(--tint); border-left: 4px solid var(--teal); }
.value-list p { margin: 0; color: var(--muted); font-size: .97rem; }
.value-list h3 { margin-bottom: .3em; }

/* Services page */
.service-rows { display: grid; gap: 22px; }
.service-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.service-row-head { display: flex; gap: 20px; }
.service-row-head h2 { font-size: 1.5rem; }
.service-row-head .card-icon { margin: 0; }
.check-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; font-size: .97rem; }
.check-list li::before { content: ''; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--grad); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.5 14.2L4.3 10l1.4-1.4 2.8 2.8 5.8-5.8 1.4 1.4-7.2 7.2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.5 14.2L4.3 10l1.4-1.4 2.8 2.8 5.8-5.8 1.4 1.4-7.2 7.2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.service-row .check-list { grid-template-columns: 1fr 1fr; align-content: start; margin: 0; }

.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.prose { font-size: 1.07rem; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.detail-grid .panel { position: sticky; top: 100px; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px; }
.team-card { display: flex; gap: 22px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); }
.avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; }
.role { font-weight: 600; color: var(--teal); margin-bottom: .6em; }

/* CTA band */
.cta-band { padding: 0 0 96px; }
.cta-band .cta-inner { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 56px; border-radius: 24px; background: var(--grad); color: rgba(255, 255, 255, .88); }
.cta-band .cta-inner::after { content: ''; position: absolute; right: -60px; top: -60px; width: 280px; height: 300px; background: url('/img/mark-white.png') center / contain no-repeat; opacity: .08; pointer-events: none; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; max-width: 560px; }
.cta-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: none; position: relative; z-index: 1; }
.cta-phone { color: #fff; font-size: .92rem; }
.section-tint + .cta-band { background: var(--tint); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--ink); }
.opt { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea { font: inherit; font-size: 1rem; font-weight: 400; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(69, 181, 178, .18); }
.form .btn { justify-self: start; }
.hp { position: absolute !important; left: -9999px; }
.contact-info { display: grid; gap: 28px; padding-top: 8px; }
.contact-info h3 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: .4em; }
.contact-info p, .contact-info a { margin: 0; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.notice { border-radius: 12px; padding: 18px 22px; margin-bottom: 20px; }
.notice ul { margin: 0; padding-left: 18px; }
.notice-ok { background: rgba(69, 181, 178, .12); border: 1px solid rgba(42, 140, 156, .3); }
.notice-ok p { margin: 0; }
.notice-err { background: #fdf0f0; border: 1px solid #f1c5c5; color: #8a2424; }
.page-404 { padding: 120px 0; }

/* Footer */
.site-footer { background: var(--navy-900); color: #9aa8c0; padding: 72px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.footer-brand img { height: 56px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 320px; }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: #c4cee0; text-decoration: none; }
.site-footer a:hover { color: var(--aqua); }
.footer-base { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; }
.footer-base img { opacity: .5; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .split, .detail-grid, .contact-grid, .service-row { grid-template-columns: 1fr; }
  .hero-visual { max-width: 400px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid .panel { position: static; }
  .cta-band .cta-inner { flex-direction: column; align-items: flex-start; padding: 40px 32px; }
  .cta-actions { align-items: flex-start; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 78px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(15, 27, 51, .08); display: none; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 14px; }
  .brand img { height: 42px; }
  .hero { padding: 40px 0 64px; }
  .hero-visual { max-width: 330px; }
  .chip { font-size: .75rem; padding: 6px 12px 6px 6px; }
  .chip-icon { width: 24px; height: 24px; }
  .chip-2 { right: -2%; } .chip-3 { left: -2%; }
  .section { padding: 64px 0; }
  .form-row, .service-row .check-list { grid-template-columns: 1fr; }
  .service-row { padding: 24px; }
  .service-row-head { flex-direction: column; }
  .row-head { flex-direction: column; align-items: start; }
  .footer-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .team-card { flex-direction: column; }
  .cta-band { padding-bottom: 64px; }
}

/* Who we serve */
.audience-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.audience-card { display: flex; flex-direction: column; padding: 32px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.audience-card p { color: var(--muted); font-size: .97rem; flex: 1; }
.audience-card .card-icon { margin-bottom: 18px; }
.audience-home { background: linear-gradient(160deg, rgba(69, 181, 178, .10), rgba(29, 63, 114, .04)); border-color: rgba(42, 140, 156, .3); }

/* Contact: client type selector */
.seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.seg legend { font-weight: 600; font-size: .92rem; color: var(--ink); margin-bottom: 8px; padding: 0; }
.form .seg-opt { display: block; position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-opt span { display: block; padding: 10px 18px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--body); transition: all .15s; }
.seg-opt input:checked + span { border-color: var(--teal); background: rgba(69, 181, 178, .12); color: var(--navy); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--aqua); outline-offset: 2px; }
[data-org][hidden] { display: none; }

/* ---------- Client portal ---------- */
.nav a.nav-portal { display: inline-flex; align-items: center; gap: 6px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .02em; }
.hint { font-size: .88rem; color: var(--muted); margin: 0; }
.portal-auth { min-height: calc(100vh - 78px); display: grid; place-items: center; padding: 40px 16px; background: var(--tint); background-image: radial-gradient(520px 320px at 85% 0%, rgba(69, 181, 178, .16), transparent 70%), radial-gradient(420px 300px at 0% 100%, rgba(29, 63, 114, .08), transparent 70%); }
.auth-shell { width: 100%; max-width: 940px; display: grid; grid-template-columns: 340px 1fr; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 2px 4px rgba(15, 27, 51, .04), 0 24px 60px rgba(15, 27, 51, .10); }
.auth-aside { position: relative; overflow: hidden; padding: 40px 34px; color: rgba(255, 255, 255, .82); background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy) 45%, var(--teal) 100%); display: flex; flex-direction: column; }
.auth-aside::after { content: ''; position: absolute; right: -70px; bottom: -60px; width: 260px; height: 290px; background: url('/img/mark-white.png') center / contain no-repeat; opacity: .07; }
.auth-mark { width: 44px; height: auto; margin-bottom: 26px; }
.auth-kicker { font-family: var(--font-head); font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--aqua); margin: 0 0 8px; }
.auth-aside h2 { color: #fff; font-size: 1.55rem; margin: 0 0 22px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: .95rem; }
.auth-points li { position: relative; padding-left: 26px; }
.auth-points li::before { content: ''; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--aqua); border-bottom: 2px solid var(--aqua); transform: rotate(-45deg); }
.auth-help { margin: auto 0 0; padding-top: 28px; font-size: .88rem; color: rgba(255, 255, 255, .7); }
.auth-card { padding: 40px 44px; min-width: 0; }
.auth-card h1 { font-size: 1.55rem; margin-bottom: .25em; }
.auth-sub { font-size: .97rem; margin-bottom: 0; }
.auth-card .form { margin-top: 22px; gap: 14px; }
.auth-card .form input, .auth-card .form select { padding: 11px 13px; }
.auth-card .notice { margin-bottom: 18px; padding: 12px 16px; font-size: .94rem; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 20px; font-size: .92rem; }
.auth-links a { color: var(--teal); font-weight: 600; text-decoration: none; }
.captcha { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 14px; padding: 14px; border: 1.5px dashed var(--line); border-radius: 12px; }
.captcha img { border-radius: 10px; }
.code-input { font-size: 1.4rem !important; letter-spacing: .3em; text-align: center; }
.qr { display: grid; place-items: center; padding: 16px; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 14px; }
.steps-list { padding-left: 20px; margin: 16px 0 0; display: grid; gap: 6px; }
.manual { font-size: .92rem; margin-bottom: 8px; }
.manual summary { cursor: pointer; color: var(--teal); font-weight: 600; }
.manual code { display: block; margin-top: 8px; padding: 10px 12px; background: var(--tint); border-radius: 8px; word-break: break-all; }
.codes { list-style: none; padding: 16px; margin: 18px 0 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; background: var(--tint); border-radius: 12px; font-size: 1.02rem; color: var(--ink); }
.portal-bar { background: var(--navy-900); color: #c4cee0; padding: 22px 0; }
.portal-bar .eyebrow { margin: 0 0 2px; color: var(--aqua); }
.portal-who { margin: 0; color: #fff; }
.portal-who .muted { color: #9aa8c0; }
.portal-bar-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.portal-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.portal-nav a, .portal-nav .link-btn { color: #c4cee0; text-decoration: none; font-weight: 600; font-size: .92rem; padding: 8px 14px; border-radius: 999px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.portal-nav a:hover, .portal-nav .link-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.portal-nav a.on { background: rgba(69, 181, 178, .18); color: #fff; }
.portal-nav form { margin: 0; }
.portal-main { padding-top: 40px; min-height: 50vh; }
.portal-head { margin-bottom: 18px; }
.portal-head h1 { margin: 0; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tabs a { padding: 7px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--muted); border: 1.5px solid var(--line); }
.tabs a.on { border-color: var(--teal); color: var(--navy); background: rgba(69, 181, 178, .1); }
.ticket-list { display: grid; gap: 10px; }
.ticket-row { display: flex; align-items: center; gap: 16px; padding: 18px 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--body); transition: border-color .15s, box-shadow .15s; }
.ticket-row:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.t-num { color: var(--muted); font-size: .9rem; min-width: 56px; }
.t-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.t-main strong { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-main .muted { font-size: .86rem; }
.status, .pri { display: inline-block; white-space: nowrap; font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #eef1f6; color: var(--muted); }
.status-open { background: rgba(36, 90, 138, .12); color: var(--navy); }
.status-in-progress { background: rgba(69, 181, 178, .18); color: #135a63; }
.status-waiting-on-client { background: #fff4dc; color: #8a5a00; }
.status-resolved { background: #e6f6ec; color: #1d6b3a; }
.pri-high { background: #fff4dc; color: #8a5a00; }
.pri-urgent { background: #fde8e8; color: #a32020; }
.empty-state { text-align: center; padding: 48px 24px; }
.narrow-panel { max-width: 760px; }
.ticket-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 20px; }
.ticket-head .muted { margin: 0; }
.ticket-head h1 { margin: 4px 0; }
.thread { display: grid; gap: 14px; margin-bottom: 22px; }
.msg-bubble { padding: 18px 22px; border-radius: 16px; border: 1px solid var(--line); background: #fff; max-width: 820px; }
.msg-bubble.from-staff { background: linear-gradient(160deg, rgba(69, 181, 178, .1), rgba(29, 63, 114, .04)); border-color: rgba(42, 140, 156, .3); margin-left: auto; }
.msg-bubble header { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; margin-bottom: 8px; }
.msg-bubble header time { color: var(--muted); }
.msg-bubble p { margin: 0; white-space: pre-wrap; color: var(--ink); }
.reply-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form .check-inline { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.check-inline input { width: auto; accent-color: var(--teal); }
.closed-panel { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.closed-panel p { margin: 0; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.account-grid .panel { padding: 28px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 16px; }
.dl dt { color: var(--muted); font-size: .9rem; }
.dl dd { margin: 0; color: var(--ink); font-weight: 500; }
.btn-sm.btn-ghost, .btn-ghost.btn-sm { box-shadow: inset 0 0 0 2px var(--line); }
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 520px; }
  .auth-aside { padding: 22px 24px; flex-direction: row; align-items: center; gap: 14px; }
  .auth-aside .auth-mark { width: 30px; margin: 0; }
  .auth-aside h2, .auth-points, .auth-help { display: none; }
  .auth-aside .auth-kicker { margin: 0; color: #fff; }
}
@media (max-width: 760px) {
  .portal-auth { padding: 20px 12px 40px; place-items: start center; }
  .auth-card { padding: 26px 20px; }
  .captcha { grid-template-columns: 1fr; }
  .ticket-row { flex-wrap: wrap; gap: 8px 12px; padding: 16px; }
  .t-main { flex-basis: 100%; order: 2; }
  .t-main strong { white-space: normal; }
  .ticket-head, .closed-panel { flex-direction: column; }
  .msg-bubble { padding: 16px; }
  .codes { grid-template-columns: 1fr; }
  .nav a.nav-portal { justify-content: flex-start; }
}
.h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
