/* ============================================================
   Support site add-on — help centre (/help), service status (/status)
   and the support blocks (Support search, Help topics, Help guides).
   Loaded by includes/header.php whenever this file exists. Built to
   sit with the Studio Support theme (orange header, heroes and footer,
   white pages), using the theme's colour variables throughout:
     --color-primary   hero backgrounds, buttons, links, icons
     --color-accent    button hover
     --color-dark      text
   ============================================================ */

:root {
  --sp-surface: #FFFFFF;
  --sp-muted: #55565C;
  --sp-line: #EAE8E3;
  --sp-tint: color-mix(in srgb, var(--color-primary) 8%, #fff);
  --sp-wrap: 1240px;
}

.sp-wrap { max-width: var(--sp-wrap); margin: 0 auto; padding: 0 1.5rem; }
.sp-section { padding: 3.5rem 0; }
.sp-section-tight { padding-top: 1rem; }
.sp-section-cta { padding-top: 1rem; padding-bottom: 5rem; }
.sp-surface { background: #fff; border-top: 1px solid var(--sp-line); }
.sp-h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); margin: 0; }
h2.sp-h3, h3.sp-h3, .sp-h3 { font-size: 1.35rem; margin: 2.25rem 0 .9rem; }
.sp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.sp-head .eyebrow { display: block; }
.sp-empty { color: var(--sp-muted); font-size: 1.1rem; }
.sp-count { color: var(--sp-muted); margin: 0 0 1rem; font-weight: 500; }
.sp-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.sp-chip { display: inline-block; font-size: .8rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: var(--sp-surface); color: var(--color-dark); }
.sp-chip-dark { background: rgba(255,255,255,.18); color: #fff; }

/* Studio header: a small "Support" tag beside the logo */
/* (only when there's no logo image — the Newedge Support logo already says it) */
.theme-studio .site-header .logo { display: inline-flex; align-items: center; gap: .75rem; }
.theme-studio .site-header .logo:not(:has(img, svg))::after {
  content: 'Support'; font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--color-primary); background: #fff; border-radius: 999px; padding: .25rem .6rem;
}

/* ---- Orange hero (help pages, status page, Support search block) ---- */
.sp-hero .accent-word { background: #fff; color: var(--color-primary); }
.sp-hero, .block.sp-hero { background: var(--color-primary); color: #fff; padding: 3.5rem 0 3.75rem; }
.sp-hero h1 { color: #fff; font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -.03em; margin: .25rem 0 0; max-width: 20ch; }
.sp-hero-short h1 { font-size: clamp(2.2rem, 4.2vw, 3.2rem); }
.sp-hero-article h1 { font-size: clamp(2rem, 3.8vw, 3rem); max-width: 24ch; }
.sp-hero .sp-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; }
.sp-standfirst { margin: 0; color: rgba(255,255,255,.88); font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.55; max-width: 42rem; }
.sp-crumbs { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; color: rgba(255,255,255,.75); font-size: .92rem; }
.sp-crumbs a { color: rgba(255,255,255,.8); text-decoration: none; }
.sp-crumbs a:hover { color: #fff; text-decoration: underline; }
.sp-crumbs [aria-current] { color: #fff; font-weight: 600; }
.sp-draft-note { margin: 0; background: #fff; color: #111; font-weight: 600; padding: .4rem .8rem; border-radius: 8px; font-size: .9rem; }
.sp-hero-meta { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; color: rgba(255,255,255,.85); font-size: .92rem; border-top: 1px solid rgba(255,255,255,.25); padding-top: 1.1rem; width: 100%; }
.sp-hero-search { margin-left: auto; min-width: min(100%, 320px); }
.sp-hero-search .sp-search .btn { padding: .55rem 1rem; font-size: .9rem; }

/* Search box */
.sp-search { display: flex; align-items: center; gap: .6rem; background: #fff; border-radius: 999px; padding: .4rem .4rem .4rem 1.1rem; width: 100%; max-width: 720px; border: 1.5px solid #DAD8D2; }
.sp-search:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 30%, transparent); }
.sp-hero .sp-search { border-color: #fff; box-shadow: 0 12px 30px rgba(80, 20, 0, .18); }
.sp-hero .sp-search:focus-within { box-shadow: 0 0 0 4px rgba(255,255,255,.45); }
.sp-hero .sp-search .btn-primary:hover { background: var(--color-accent); }
.sp-search-icon { color: var(--sp-muted); display: inline-flex; flex-shrink: 0; }
.sp-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 1rem; color: var(--color-dark); padding: .55rem 0; }
.sp-search .btn { margin: 0; white-space: nowrap; }
.sp-search-lg { padding: .5rem .5rem .5rem 1.4rem; }
.sp-search-lg input { font-size: 1.08rem; padding: .65rem 0; }
.sp-search-lg .btn { padding: .85rem 1.5rem; }

/* Live status line */
.sp-status-pill { display: inline-flex; align-items: center; gap: .6rem; background: #fff; color: var(--color-dark); padding: .45rem .95rem; border-radius: 999px; font-size: .9rem; font-weight: 500; text-decoration: none; }
.sp-status-pill:hover { color: var(--color-dark); box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.sp-status-link { color: var(--color-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.sp-status-link::before { content: '·'; margin-right: .5rem; color: #A3A4AB; display: inline-block; text-decoration: none; }

/* Popular quick links under the search */
.sp-quicks { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sp-quicks-label { color: rgba(255,255,255,.85); font-size: .92rem; margin-right: .25rem; }
.sp-quick { color: #fff; background: transparent; text-decoration: none; border: 1.5px solid rgba(255,255,255,.6); border-radius: 999px; padding: .5rem .95rem; font-size: .9rem; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.sp-quick:hover { background: #fff; border-color: #fff; color: var(--color-primary); }

/* Home page: the hero is a block, so it follows the block padding */
.theme-studio .block.sp-hero-home { padding: 4rem 0 4.25rem; }
.sp-hero-home h1 { font-size: clamp(2.8rem, 6.2vw, 4.8rem); max-width: 14ch; letter-spacing: -.04em; line-height: 1.02; }
/* A Feature grid straight after the Support search sits a little closer to it */
.block-support-search + .block-feature-grid { padding-top: 3rem; }

/* ---- Topic cards ---- */
.sp-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.sp-topic { display: flex; flex-direction: column; gap: .7rem; background: #fff; border: 1px solid var(--sp-line); border-radius: 20px; padding: 1.6rem; text-decoration: none; color: var(--color-dark); transition: border-color .2s; }
.sp-topic:hover { border-color: #CFCDC7; color: var(--color-dark); }
.sp-topic-icon { width: 2.9rem; height: 2.9rem; border-radius: 12px; background: var(--sp-tint); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; }
.sp-topic:hover .sp-topic-name { color: var(--color-primary); }
.sp-topic-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.15; transition: color .2s; }
.sp-topic-desc { color: var(--sp-muted); font-size: 1rem; }
.sp-topic-foot { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--sp-line); display: flex; justify-content: space-between; gap: 1rem; color: var(--sp-muted); font-size: .88rem; }
.sp-topic-count { white-space: nowrap; font-weight: 600; color: var(--color-dark); }

/* ---- Article rows ---- */
.sp-rows { border-top: 1px solid var(--sp-line); }
.sp-row { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--sp-line); text-decoration: none; color: var(--color-dark); }
.sp-row:hover .sp-row-title { color: var(--color-primary); }
.sp-row:hover .sp-row-arrow { transform: translateX(4px); color: var(--color-primary); }
.sp-row-num { color: var(--color-primary); font-weight: 700; min-width: 2rem; }
.sp-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.sp-row-title { font-weight: 600; font-size: 1.05rem; line-height: 1.35; transition: color .2s; }
.sp-row-meta { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; }
.sp-row-summary { color: var(--sp-muted); font-size: .97rem; }
.sp-row-arrow { display: inline-flex; flex-shrink: 0; transition: transform .25s var(--motion-easing); }

/* Copy beside a list (help front page, Help guides block) */
.sp-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.sp-split-copy { display: flex; flex-direction: column; gap: 1rem; }
.sp-split-copy .eyebrow { margin: 0; }
.sp-split-copy h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin: 0; max-width: 18ch; }
.sp-split-copy p { color: var(--sp-muted); font-size: 1.05rem; margin: 0; }
.sp-btns { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .5rem; }

/* ---- Help page layout: topics menu + content ---- */
.sp-layout { display: flex; flex-wrap: wrap; gap: 3rem; align-items: flex-start; }
.sp-aside { flex: 1 1 240px; max-width: 280px; display: flex; flex-direction: column; gap: 1.5rem; }
.sp-main, .sp-article { flex: 999 1 560px; min-width: 0; }
.sp-main { display: flex; flex-direction: column; gap: 1.5rem; }
.sp-side-topics { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--sp-line); border-radius: 18px; padding: .5rem; }
.sp-side-topics a { display: flex; justify-content: space-between; gap: .75rem; padding: .65rem .85rem; border-radius: 10px; text-decoration: none; color: var(--color-dark); font-weight: 500; }
.sp-side-topics a:hover { background: var(--sp-tint); }
.sp-side-topics a.is-active { background: var(--sp-tint); color: var(--color-primary); font-weight: 700; }
.sp-side-count { opacity: .6; }
.sp-side-in { display: flex; flex-direction: column; }
.sp-side-label { font-weight: 700; margin-bottom: .5rem; }
.sp-side-in a { padding: .6rem 0; border-top: 1px solid var(--sp-line); text-decoration: none; color: var(--color-dark); font-size: .95rem; }
.sp-side-in a:hover { color: var(--color-primary); }
.sp-side-in a.is-current { color: var(--color-primary); font-weight: 700; }

/* ---- One guide ---- */
.sp-article { max-width: 800px; display: flex; flex-direction: column; gap: 2rem; }
.sp-inshort { background: var(--sp-tint); border-radius: 18px; padding: 1.3rem 1.6rem; }
.sp-box-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.sp-inshort ul { margin: .6rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .3rem; }
.sp-body { font-size: 1.08rem; line-height: 1.75; color: #2A2B30; }
.sp-body > :first-child { margin-top: 0; }
.sp-body h2 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); color: var(--color-dark); margin: 2.2rem 0 .7rem; }
.sp-body h3 { font-size: 1.2rem; color: var(--color-dark); margin: 1.6rem 0 .5rem; }
.sp-body p { margin: 0 0 1.15rem; }
.sp-body a { color: var(--color-primary); font-weight: 600; }
.sp-body ul { padding-left: 1.3rem; margin: 0 0 1.25rem; }
.sp-body li { margin-bottom: .4rem; }
.sp-body img { max-width: 100%; height: auto; border-radius: 16px; margin: .5rem 0; }
/* Numbered lists are steps: a big numbered circle beside each */
.sp-body ol { list-style: none; counter-reset: sp-step; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
.sp-body ol > li { counter-increment: sp-step; position: relative; padding-left: 3rem; min-height: 2.1rem; margin: 0; }
.sp-body ol > li::before { content: counter(sp-step); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--sp-tint); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; font-size: .95rem; }
.sp-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: 1rem; display: block; overflow-x: auto; }
.sp-body th, .sp-body td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--sp-line); vertical-align: top; }
.sp-body th { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sp-muted); }
.sp-body blockquote { margin: 1.5rem 0; padding: 1.25rem 1.5rem; background: var(--sp-tint); border-radius: 18px; font-size: 1.05rem; }
.sp-body blockquote p:last-child { margin-bottom: 0; }

/* Was this helpful? */
.sp-feedback { border-top: 1px solid var(--sp-line); border-bottom: 1px solid var(--sp-line); padding: 1.4rem 0; scroll-margin-top: 6rem; }
.sp-feedback-ask { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.sp-feedback-q { font-weight: 700; font-size: 1.08rem; }
.sp-feedback-btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.sp-feedback-btns .btn, .sp-feedback-actions .btn { padding: .75rem 1.25rem; font-size: .95rem; display: inline-flex; align-items: center; gap: .4rem; }
.sp-feedback-more { display: flex; flex-direction: column; gap: .75rem; }
.sp-feedback-more textarea { font: inherit; border: 1.5px solid #D6D5D0; border-radius: 14px; padding: .8rem 1rem; resize: vertical; }
.sp-feedback-more textarea:focus { outline: none; border-color: var(--color-dark); }
.sp-feedback-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.sp-feedback-done { margin: 0; font-size: 1.1rem; }

/* "Still stuck? Raise a ticket" */
.sp-cta { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem 2rem; flex-wrap: wrap; background: var(--sp-tint); border: 1px solid color-mix(in srgb, var(--color-primary) 14%, #fff); color: var(--color-dark); border-radius: 24px; padding: clamp(1.75rem, 4vw, 2.75rem); text-decoration: none; }
.sp-cta:hover { color: var(--color-dark); }
.sp-cta-copy { display: flex; flex-direction: column; gap: .5rem; max-width: 40rem; }
.sp-cta-heading { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.1; letter-spacing: -.025em; }
.sp-cta-text { font-size: 1.02rem; color: var(--sp-muted); line-height: 1.5; }
.sp-cta-btn { background: var(--color-primary); color: #fff; padding: .95rem 1.7rem; font-size: 1rem; transition: background .2s; }
.sp-cta:hover .sp-cta-btn { background: var(--color-accent); color: #fff; }
.sp-cta-compact { border-radius: 18px; padding: 1.4rem 1.6rem; }
.sp-cta-compact .sp-cta-heading { font-size: 1.3rem; letter-spacing: -.015em; }
.sp-cta-compact .sp-cta-text { font-size: .97rem; }
.sp-cta-compact .sp-cta-btn { padding: .75rem 1.3rem; font-size: .93rem; }

/* Related guides */
.sp-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; margin-top: 1.75rem; }
.sp-rel { background: #fff; border: 1px solid var(--sp-line); border-radius: 18px; padding: 1.4rem; text-decoration: none; color: var(--color-dark); display: flex; flex-direction: column; gap: .5rem; }
.sp-rel-cat { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-primary); }
.sp-rel-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; line-height: 1.2; letter-spacing: -.01em; }
.sp-rel:hover .sp-rel-title { color: var(--color-primary); }

/* ============================================================
   Service status (/status)
   ============================================================ */
.st-hero { flex-direction: row !important; justify-content: space-between; align-items: flex-end !important; flex-wrap: wrap; gap: 2rem !important; }
.st-hero > div { display: flex; flex-direction: column; gap: 1rem; }
.st-subscribe { display: flex; flex-direction: column; gap: .6rem; }
.st-subscribe label { color: rgba(255,255,255,.88); font-size: .92rem; }
.st-subscribe-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.st-subscribe input[type=email] { font: inherit; color: var(--color-dark); background: #fff; border: 1.5px solid #fff; border-radius: 999px; padding: .75rem 1.2rem; min-width: min(100%, 270px); min-height: 46px; }
.st-subscribe input[type=email]:focus { outline: none; border-color: var(--color-dark); }
.st-subscribe .btn { padding: .75rem 1.3rem; background: var(--color-accent); color: #fff; }
.st-subscribe .btn:hover { background: #fff; color: var(--color-primary); }
.st-page .sp-wrap { display: flex; flex-direction: column; gap: 1.25rem; }
.st-flash { margin: 0; padding: 1rem 1.25rem; border-radius: 14px; font-weight: 600; }
.st-flash-ok { background: #E7F5EC; color: #156B39; }
.st-flash-error { background: #FDECEA; color: #8A1C12; }

.st-overall { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; border-radius: 18px; padding: 1.25rem 1.5rem; color: #135F33; background: #EAF6EF; border: 1px solid #CDEBD9; }
.st-overall-maintenance { color: #1D4F9E; background: #EDF3FD; border-color: #D3E2FA; }
.st-overall-degraded { color: #6E4700; background: #FFF6E2; border-color: #F6E2B6; }
.st-overall-partial { color: #8A3A06; background: #FFEFE4; border-color: #F8D7C2; }
.st-overall-major { color: #8A1C12; background: #FDEEEC; border-color: #F6D2CD; }
.st-overall-icon { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: currentColor; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-overall-icon svg { color: #fff; }
.st-overall-text { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.25rem, 2.2vw, 1.5rem); letter-spacing: -.015em; line-height: 1.2; }
.st-overall-sub { margin: .15rem 0 0; opacity: .85; font-size: .95rem; }

/* Incident and maintenance cards */
.st-incident { border-radius: 18px; padding: 1.4rem 1.6rem; background: #fff; border: 1px solid var(--sp-line); display: flex; flex-direction: column; gap: .5rem; }
.st-incident-degraded { border-left: 4px solid #C98A12; }
.st-incident-partial { border-left: 4px solid #D9640B; }
.st-incident-major { border-left: 4px solid #B42318; }
.st-incident-maintenance { border-left: 4px solid #2F6FD0; }
.st-inc-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.st-kind { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.st-inc-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; letter-spacing: -.015em; margin: 0; line-height: 1.2; }
.st-inc-when { margin: 0; color: var(--sp-muted); }
.st-affects { color: var(--sp-muted); font-size: .95rem; }
.st-timeline { list-style: none; margin: .5rem 0 0; padding: 0 0 0 1.1rem; border-left: 2px solid rgba(14,15,18,.12); display: flex; flex-direction: column; gap: .9rem; }
.st-timeline li { position: relative; }
.st-timeline li::before { content: ''; position: absolute; left: calc(-1.1rem - 6px); top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: #B9B7B0; }
.st-tl-state { font-weight: 700; }
.st-tl-when { color: var(--sp-muted); font-size: .9rem; }
.st-timeline p { margin: .2rem 0 0; }

/* Status pills */
.st-pill { display: inline-flex; align-items: center; gap: .45rem; border-radius: 999px; font-size: .85rem; font-weight: 600; padding: .35rem .8rem; white-space: nowrap; }
.st-pill-operational { background: #E7F5EC; color: #156B39; }
.st-pill-maintenance { background: #E8F0FC; color: #1D4F9E; }
.st-pill-degraded { background: #FFF3DC; color: #7A4F00; }
.st-pill-partial { background: #FFE9DB; color: #8A3A06; }
.st-pill-major { background: #FDECEA; color: #8A1C12; }

/* Services with 60-day history */
.st-services { border: 1px solid var(--sp-line); border-radius: 18px; overflow: hidden; margin-top: .75rem; }
.st-services-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.4rem 1.75rem; }
.st-services-head .sp-h3 { margin: 0; }
.st-key { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: var(--sp-muted); }
.st-key > span { display: inline-flex; align-items: center; gap: .4rem; }
.st-key-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.st-service { padding: 1.4rem 1.75rem; border-top: 1px solid var(--sp-line); display: flex; flex-direction: column; gap: .9rem; }
.st-service-top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.st-service-icon { width: 2.5rem; height: 2.5rem; border-radius: 10px; background: var(--sp-tint); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-service-name { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.st-service-name strong { font-size: 1.1rem; }
.st-service-name span { color: var(--sp-muted); font-size: .92rem; }
.st-bar { display: flex; gap: 3px; }
.st-day { flex: 1; height: 28px; border-radius: 3px; min-width: 2px; }
.st-operational { background: #5DB383; }
.st-maintenance { background: #2F6FD0; }
.st-degraded { background: #C98A12; }
.st-partial { background: #D9640B; }
.st-major { background: #B42318; }
.st-bar-ends { display: flex; justify-content: space-between; font-size: .82rem; color: var(--sp-muted); }
.st-live { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .86rem; color: var(--sp-muted); }
.st-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #1F8A4C; box-shadow: 0 0 0 0 rgba(31, 138, 76, .5); animation: st-live-pulse 2.4s ease-out infinite; flex: none; }
@keyframes st-live-pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 138, 76, .45); } 70% { box-shadow: 0 0 0 7px rgba(31, 138, 76, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 138, 76, 0); } }
@media (prefers-reduced-motion: reduce) { .st-live-dot { animation: none; } }
.st-live-dot.st-degraded, .st-live-dot.st-partial, .st-live-dot.st-major, .st-live-dot.st-maintenance { animation: none; box-shadow: none; }
.st-live-dot.st-operational { background: #1F8A4C; }
.st-live-dot.st-maintenance { background: #2F6FD0; }
.st-live-dot.st-degraded { background: #C98A12; }
.st-live-dot.st-partial { background: #D9640B; }
.st-live-dot.st-major { background: #B42318; }

/* Past incidents */
.st-past { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; margin-top: 3rem; }
.st-past-copy { display: flex; flex-direction: column; gap: .8rem; }
.st-past-copy .eyebrow { margin: 0; }
.st-past-copy p { color: var(--sp-muted); margin: 0; }
.st-past-list { display: flex; flex-direction: column; gap: .75rem; }
.st-incident-past { padding: 0; border-left-width: 1px; }
.st-incident-past summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.2rem 1.5rem; }
.st-incident-past summary::-webkit-details-marker { display: none; }
.st-incident-past summary .st-inc-title { font-size: 1.05rem; }
.st-inc-side { display: inline-flex; align-items: center; gap: .75rem; }
.st-inc-date { color: var(--sp-muted); font-size: .9rem; }
.st-inc-body { padding: 0 1.5rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; }

/* ---- Phones ---- */
@media (max-width: 860px) {
  .sp-split, .st-past { grid-template-columns: minmax(0, 1fr); }
  .sp-aside { max-width: none; order: 2; } /* the guide first, the topics menu after it */
  .sp-hero-search { margin-left: 0; width: 100%; }
  .sp-search .btn { padding: .7rem 1rem; }
}
@media (max-width: 560px) {
  .theme-studio .site-header .logo::after { display: none; }
  .sp-status-link { display: none; }
  .sp-search-lg { padding-left: 1rem; }
  .sp-search-lg .sp-search-icon { display: none; }
  .st-day { height: 26px; }
  .st-bar { gap: 2px; }
  .st-overall, .st-incident { padding: 1.3rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-topic, .sp-topic-name, .sp-row-arrow { transition: none; }
}

/* ============================================================
   Raise a ticket (Ticket form block)
   ============================================================ */
.block-ticket-form { scroll-margin-top: 5rem; }
.tk-wrap { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 1.5rem; align-items: start; }
.tk-wrap.is-done { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.tk-main { min-width: 0; }
.tk-head { margin-bottom: 1.25rem; }
.tk-head h2 { margin: 0 0 .5rem; }
.tk-head p { color: var(--sp-muted); margin: 0; }
.tk-form { background: #fff; border: 1px solid var(--sp-line); border-radius: 24px; padding: clamp(1.4rem, 3.5vw, 2.5rem); display: flex; flex-direction: column; gap: 1.4rem; box-shadow: 0 20px 50px rgba(14,15,18,.06); }
.tk-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tk-field { display: flex; flex-direction: column; gap: .45rem; margin: 0; }
.tk-field > span, .tk-set legend { font-weight: 600; font-size: .95rem; color: var(--color-dark); }
.tk-field small { color: var(--sp-muted); font-size: .88rem; }
.tk-form input[type=text], .tk-form input[type=email], .tk-form input[type=tel], .tk-form textarea {
  font: inherit; font-size: 1rem; color: var(--color-dark); background: #fff; border: 1.5px solid #D6D5D0; border-radius: 14px; padding: .8rem 1rem; min-height: 50px; width: 100%; box-sizing: border-box;
}
.tk-form textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
.tk-form input:focus, .tk-form textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 22%, transparent); }
.tk-set { border: 0; padding: 0; margin: 0; }
.tk-set legend { padding: 0; margin-bottom: .7rem; }
.tk-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tk-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.tk-chip { display: inline-flex; align-items: center; min-height: 44px; padding: .55rem 1rem; border: 1.5px solid var(--sp-line); border-radius: 999px; background: #fff; font-weight: 500; font-size: .95rem; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.tk-chip:hover { border-color: var(--color-primary); }
.tk-radio:checked + .tk-chip { background: var(--color-primary); border-color: var(--color-primary); color: #fff; font-weight: 600; }
.tk-radio:focus-visible + .tk-chip, .tk-radio:focus-visible + .tk-urg { outline: 3px solid color-mix(in srgb, var(--color-primary) 40%, transparent); outline-offset: 2px; }
.tk-urgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.tk-urg { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; border: 1.5px solid var(--sp-line); border-radius: 16px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.tk-urg strong { font-size: 1rem; }
.tk-urg span { font-size: .86rem; color: var(--sp-muted); line-height: 1.35; }
.tk-urg:hover { border-color: var(--color-primary); }
.tk-radio:checked + .tk-urg { border-color: var(--color-primary); background: var(--sp-tint); }
.tk-radio:checked + .tk-urg-critical { background: var(--color-primary); color: #fff; }
.tk-radio:checked + .tk-urg-critical span { color: rgba(255,255,255,.9); }
.tk-suggest { background: var(--sp-tint); border-radius: 16px; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; margin-top: -.5rem; }
.tk-suggest[hidden] { display: none; }
.tk-suggest-title { font-weight: 700; font-size: .95rem; }
.tk-suggest-list { display: flex; flex-direction: column; gap: .35rem; }
.tk-suggest-list a { color: var(--color-dark); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--color-primary) 50%, transparent); text-underline-offset: 3px; }
.tk-suggest-list a:hover { color: var(--color-primary); }
.tk-drop { border: 2px dashed #D6D5D0; border-radius: 18px; padding: 1.3rem 1.4rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; transition: border-color .15s, background .15s; }
.tk-drop.is-over { border-color: var(--color-primary); background: var(--sp-tint); }
.tk-drop-icon { width: 2.75rem; height: 2.75rem; border-radius: 12px; background: var(--sp-tint); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tk-drop-copy { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: .15rem; }
.tk-drop-copy span { color: var(--sp-muted); font-size: .9rem; }
.tk-drop-btn { position: relative; overflow: hidden; cursor: pointer; padding: .7rem 1.2rem; }
.tk-drop-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tk-drop-btn:focus-within { outline: 3px solid color-mix(in srgb, var(--color-primary) 40%, transparent); outline-offset: 2px; }
.tk-files { list-style: none; margin: -.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tk-files[hidden] { display: none; }
.tk-files li { background: var(--sp-tint); border-radius: 999px; padding: .4rem .5rem .4rem .9rem; font-size: .88rem; display: inline-flex; align-items: center; gap: .4rem; }
.tk-files button { border: 0; background: #fff; color: var(--color-dark); border-radius: 999px; padding: .25rem .6rem; font: inherit; font-size: .8rem; cursor: pointer; }
.tk-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--sp-line); padding-top: 1.3rem; }
.tk-foot small { color: var(--sp-muted); max-width: 26rem; }
.tk-submit { padding: 1rem 2rem; font-size: 1.05rem; }
.tk-submit[disabled] { opacity: .7; cursor: wait; }
.tk-error { margin: 0; background: #FDEEEC; color: #8A1C12; border-radius: 12px; padding: .85rem 1rem; font-weight: 600; }
.tk-error[hidden] { display: none; }
.tk-guide-note { margin: 0; background: var(--sp-tint); border-radius: 12px; padding: .75rem 1rem; display: flex; gap: .5rem; align-items: center; font-size: .95rem; }
.tk-guide-note svg { color: var(--color-primary); flex-shrink: 0; }
.tk-aside { display: flex; flex-direction: column; gap: 1rem; }
.tk-aside-card { background: #fff; border: 1px solid var(--sp-line); border-radius: 20px; padding: 1.4rem 1.5rem; }
.tk-aside-card h3 { font-size: 1.15rem; margin: 0 0 .6rem; }
.tk-aside-card p { margin: 0 0 .8rem; color: var(--sp-muted); font-size: .97rem; }
.tk-aside-card p:last-child { margin-bottom: 0; }
.tk-aside-card ul { margin: 0; padding-left: 1.1rem; color: var(--sp-muted); font-size: .97rem; display: flex; flex-direction: column; gap: .3rem; }
.tk-aside-btn { padding: .65rem 1.2rem; font-size: .92rem; }
.tk-success { background: #fff; border: 1px solid var(--sp-line); border-radius: 24px; padding: clamp(1.75rem, 4vw, 3rem); display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; outline: none; }
.tk-success h2 { margin: 0; }
.tk-success p { margin: 0; color: var(--sp-muted); font-size: 1.08rem; max-width: 38rem; }
.tk-success-icon { width: 3.25rem; height: 3.25rem; border-radius: 50%; background: #1F8A4C; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; }
@media (max-width: 960px) {
  .tk-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .tk-row, .tk-urgs { grid-template-columns: minmax(0, 1fr); }
  .tk-submit { width: 100%; }
}
.tk-wrap.is-done .tk-aside { display: none; }
.tk-success { scroll-margin-top: 6rem; }

/* ---- Start a support plan (plan_enquiry block, includes/plan-enquiry.php) ---- */
.pe-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.pe-plan { position: relative; display: flex; flex-direction: column; gap: .45rem; padding: 1rem 1.1rem 1.1rem; border: 1.5px solid var(--sp-line); border-radius: 18px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.pe-plan:hover { border-color: var(--color-primary); }
.pe-plan-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.pe-plan-top strong { font-size: 1.05rem; letter-spacing: .02em; }
.pe-tick { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 1.5px solid var(--sp-line); display: inline-flex; align-items: center; justify-content: center; color: transparent; flex: none; }
.pe-price { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--color-dark); }
.pe-price small { display: block; font-size: .8rem; font-weight: 500; color: var(--sp-muted); margin-top: .2rem; }
.pe-plan ul { list-style: none; margin: .2rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; font-size: .86rem; color: var(--sp-muted); }
.pe-plan ul li::before { content: "·"; margin-right: .35rem; color: var(--color-primary); font-weight: 700; }
.pe-unsure-text { font-size: .9rem; color: var(--sp-muted); }
.pe-plan-unsure { border-style: dashed; }
.tk-radio:checked + .pe-plan { border-color: var(--color-primary); background: var(--sp-tint); box-shadow: 0 0 0 1px var(--color-primary); }
.tk-radio:checked + .pe-plan .pe-tick { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.tk-radio:focus-visible + .pe-plan { outline: 3px solid color-mix(in srgb, var(--color-primary) 40%, transparent); outline-offset: 2px; }
.pe-contact { align-items: end; }
.tk-field em { font-style: normal; font-weight: 400; color: var(--sp-muted); }

.pe-steps { list-style: none; counter-reset: pe; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .85rem; }
.pe-steps li { counter-increment: pe; display: grid; grid-template-columns: 2rem 1fr; column-gap: .75rem; }
.pe-steps li::before { content: counter(pe); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; background: var(--color-primary); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.pe-steps strong { font-size: 1rem; }
.pe-steps span { color: var(--sp-muted); font-size: .92rem; line-height: 1.4; }
.pe-nothing { font-weight: 700; color: var(--color-dark) !important; margin: 0 !important; }

/* ---- Customer area (/account, account.php) ---- */
.ac-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.ac-signout { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; color: var(--sst-on, rgba(255,255,255,.86)); font-size: .92rem; }
.ac-signout strong { color: #fff; }
.ac-signout .btn { background: #fff; color: var(--color-primary); border-color: #fff; }
.ac-card { background: #fff; border: 1px solid var(--sp-line); border-radius: 22px; padding: clamp(1.25rem, 3vw, 1.75rem); }
.ac-card h2 { margin: 0 0 .5rem; }
.ac-card h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.ac-card p { margin: 0 0 .9rem; }
.ac-muted { color: var(--sp-muted); }
.ac-small { font-size: .88rem; }
.ac-narrow { max-width: 560px; }
.ac-signin { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 2.5rem 2rem; }
.ac-signin-icon { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--sp-tint); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: .5rem; }
.ac-big-btn { padding: .95rem 1.9rem; font-size: 1.05rem; }
.ac-login { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.5rem; align-items: start; }
.ac-login-aside { display: flex; flex-direction: column; gap: 1rem; }
.ac-login-form { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; margin-top: 1rem; }
.ac-login-form .tk-field { width: 100%; }
.ac-login-form input[type=email] { font: inherit; font-size: 1.05rem; border: 1.5px solid #D6D5D0; border-radius: 14px; padding: .85rem 1rem; width: 100%; box-sizing: border-box; }
.ac-login-form input[type=email]:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 22%, transparent); }
.ac-flash { border-radius: 14px; padding: .9rem 1.1rem; margin: 0 0 1.25rem !important; }
.ac-flash-ok { background: #E9F6EE; color: #17633A; }
.ac-flash-error { background: #FDEEEC; color: #8A1C12; font-weight: 600; }
.ac-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.ac-stat { display: flex; flex-direction: column; gap: .35rem; }
.ac-label { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-primary); }
.ac-big { font-size: 1.75rem; line-height: 1.15; letter-spacing: -.01em; }
.ac-big small { font-size: 1rem; font-weight: 500; color: var(--sp-muted); }
.ac-link { font-weight: 600; color: var(--color-primary); }
.ac-meter { display: block; height: 10px; background: #EFEEEA; border-radius: 99px; overflow: hidden; margin: .3rem 0 .1rem; }
.ac-meter span { display: block; height: 100%; background: #1F8A4C; border-radius: 99px; }
.ac-meter.is-high span { background: #C98A12; }
.ac-meter.is-over span { background: #B42318; }
.ac-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2.25rem; }
.ac-action { display: flex; gap: .85rem; align-items: center; background: var(--sp-tint); border-radius: 18px; padding: 1rem 1.15rem; color: var(--color-dark); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.ac-action:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(14,15,18,.07); }
.ac-action svg { color: var(--color-primary); flex: none; }
.ac-action span { display: flex; flex-direction: column; }
.ac-action small { color: var(--sp-muted); font-size: .86rem; }
.ac-section { margin-bottom: 2.5rem; scroll-margin-top: 6rem; }
.ac-section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.ac-section-head h2 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.ac-month select { font: inherit; padding: .6rem 2.2rem .6rem .9rem; border: 1.5px solid #D6D5D0; border-radius: 12px; background: #fff; }
.ac-table-wrap { overflow-x: auto; border: 1px solid var(--sp-line); border-radius: 18px; background: #fff; }
.ac-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.ac-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sp-muted); padding: .85rem 1.1rem; border-bottom: 1px solid var(--sp-line); }
.ac-table td { padding: .85rem 1.1rem; border-bottom: 1px solid var(--sp-line); vertical-align: top; }
.ac-table tbody tr:last-child td { border-bottom: 0; }
.ac-table tfoot td { font-weight: 700; border-top: 1px solid var(--sp-line); border-bottom: 0; background: var(--sp-tint); }
.ac-table .ac-num { text-align: right; white-space: nowrap; }
.ac-table tr.is-soon td { background: #FFF8F2; }
.ac-table tr.is-past td { opacity: .55; }
.ac-ref { color: var(--sp-muted); font-size: .88rem; }
.ac-tag { display: inline-block; padding: .1rem .55rem; border-radius: 99px; background: #EFEEEA; color: #555; font-size: .78rem; font-weight: 600; }
.ac-empty { background: #fff; border: 1px dashed #D6D5D0; border-radius: 18px; padding: 1.25rem 1.4rem; color: var(--sp-muted); margin: 0; }
.ac-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.ac-doc { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--sp-line); border-radius: 16px; padding: .85rem 1rem; }
.ac-doc-icon { width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--sp-tint); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ac-doc-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-doc-name small { color: var(--sp-muted); }
.ac-doc-btn { padding: .55rem 1.1rem; }
@media (max-width: 900px) {
  .ac-login, .ac-cards, .ac-actions { grid-template-columns: 1fr; }
}
.ac-hero .sp-standfirst { margin-top: .7rem; }

/* "Your account" in the main menu: a white outline button with a person icon */
.main-nav a[href="/account"] { display: inline-flex; align-items: center; gap: .45rem; border: 1.5px solid currentColor; border-radius: 999px; padding: .5rem 1rem .5rem .8rem; line-height: 1.1; font-weight: 700; transition: background .15s, color .15s; }
.main-nav a[href="/account"]::before { content: ""; width: 1.15rem; height: 1.15rem; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-1a7 7 0 0114 0v1'/%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 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-1a7 7 0 0114 0v1'/%3E%3C/svg%3E") center / contain no-repeat; }
.theme-studio-support .main-nav a[href="/account"]:hover { background: rgba(255,255,255,.14); }
.theme-studio-support .main-nav a[href="/account"]::after { display: none; }

/* Sign-in page: how signing in works */
.ac-lead { font-size: 1.05rem; color: var(--color-dark); margin: .25rem 0 1.1rem !important; }
.ac-how { list-style: none; counter-reset: ach; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.ac-how li { counter-increment: ach; background: var(--sp-tint); border-radius: 16px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .2rem; }
.ac-how li::before { content: counter(ach); width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--color-primary); color: #fff; font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .35rem; }
.ac-how strong { font-size: .97rem; }
.ac-how span { color: var(--sp-muted); font-size: .86rem; line-height: 1.4; }
@media (max-width: 700px) { .ac-how { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .main-nav a[href="/account"] { justify-content: center; margin: .9rem var(--studio-gutter, 1.5rem) .2rem; padding: .85rem 1rem; font-size: 1.05rem; width: auto; box-sizing: border-box; max-width: calc(100% - 2 * var(--studio-gutter, 1.5rem)); }
}

/* ---- Tickets in the customer area (includes/customer-tickets.php) ---- */
.ct-tabs { display: inline-flex; gap: .3rem; background: #F4F3F0; border-radius: 999px; padding: .3rem; margin-bottom: .9rem; }
.ct-tabs button { font: inherit; font-weight: 600; font-size: .95rem; border: 0; background: transparent; border-radius: 999px; padding: .5rem 1.1rem; cursor: pointer; color: var(--color-dark); }
.ct-tabs button span { display: inline-block; min-width: 1.4rem; margin-left: .3rem; padding: 0 .4rem; border-radius: 99px; background: #fff; font-size: .8rem; }
.ct-tabs button.is-on { background: var(--color-primary); color: #fff; }
.ct-tabs button.is-on span { color: var(--color-primary); }
.ct-list { display: flex; flex-direction: column; gap: .55rem; }
.ct-list[hidden] { display: none; }
.ct-row { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--sp-line); border-radius: 16px; padding: .95rem 1.15rem; color: var(--color-dark); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ct-row:hover { border-color: var(--color-primary); box-shadow: 0 8px 22px rgba(14,15,18,.06); transform: translateY(-1px); }
.ct-row.is-waiting { border-left: 4px solid #C98A12; }
.ct-num { font-weight: 700; color: var(--sp-muted); font-size: .92rem; min-width: 3.6rem; }
.ct-subj { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.ct-subj strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-subj small { color: var(--sp-muted); }
.ct-pill { display: inline-block; padding: .25rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.ct-open { background: #E8F0FB; color: #1E4F9C; }
.ct-waiting.ct-pill, .ct-pill.ct-waiting { background: #FDF2DC; color: #8A5A06; }
.ct-hold { background: #EFEEEA; color: #555; }
.ct-solved { background: #E7F5EC; color: #1F7A45; }
.ct-closed { background: #EFEEEA; color: #666; }
p.ct-waiting { display: flex; align-items: center; gap: .5rem; background: #FDF2DC; color: #6B4605; border-radius: 14px; padding: .8rem 1rem; margin: 0 0 1rem; font-weight: 600; }
p.ct-waiting svg { flex: none; }
.ct-back { background: #fff !important; color: var(--color-primary) !important; border-color: #fff !important; }
.ct-wrap { max-width: 900px; }
.ct-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; align-items: center; color: var(--sp-muted); font-size: .95rem; margin-bottom: 1.4rem; }
.ct-meta strong { color: var(--color-dark); }
.ct-thread { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.ct-msg { background: #fff; border: 1px solid var(--sp-line); border-radius: 20px; padding: 1.1rem 1.3rem 1.2rem; scroll-margin-top: 6rem; }
.ct-msg.is-staff { background: var(--sp-tint); border-color: transparent; }
.ct-msg-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; }
.ct-avatar { width: 2.3rem; height: 2.3rem; border-radius: 50%; background: #EFEEEA; color: var(--color-dark); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ct-msg.is-staff .ct-avatar { background: var(--color-primary); color: #fff; }
.ct-who { flex: 1; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ct-badge { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-primary); }
.ct-msg time { color: var(--sp-muted); font-size: .85rem; white-space: nowrap; }
.ct-body { line-height: 1.6; overflow-wrap: anywhere; }
.ct-body > :first-child { margin-top: 0; }
.ct-body > :last-child { margin-bottom: 0; }
.ct-body img { max-width: 100%; height: auto; border-radius: 8px; }
.ct-body blockquote { margin: .5rem 0; padding-left: .9rem; border-left: 3px solid var(--sp-line); color: var(--sp-muted); }
.ct-body pre { white-space: pre-wrap; background: #F4F3F0; padding: .7rem .9rem; border-radius: 10px; font-size: .9rem; }
.ct-files { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.ct-file { display: inline-flex; align-items: center; gap: .45rem; background: #fff; border: 1px solid var(--sp-line); border-radius: 999px; padding: .4rem .85rem; font-size: .88rem; color: var(--color-dark); text-decoration: none; }
.ct-file small { color: var(--sp-muted); }
.ct-file svg { color: var(--color-primary); }
.ct-reply { display: flex; flex-direction: column; gap: .9rem; }
.ct-reply textarea { font: inherit; font-size: 1rem; border: 1.5px solid #D6D5D0; border-radius: 14px; padding: .8rem 1rem; min-height: 140px; resize: vertical; width: 100%; box-sizing: border-box; line-height: 1.55; }
.ct-reply textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 22%, transparent); }
.ct-reply-foot { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.ct-reply-foot .btn-primary { margin-left: auto; }
.ct-attach { position: relative; overflow: hidden; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; padding: .65rem 1.1rem !important; font-size: .95rem !important; }
.ct-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ct-closed-box h3 { margin-top: 0; }
@media (max-width: 640px) { .ct-row { flex-wrap: wrap; } .ct-num { min-width: 0; } .ct-pill { order: 3; } }
