/* Nifty Services portal — plain CSS, mobile first.
   Brand from new.nifty.services: coral #FA6559, red #FE3628, slate #1E293B, light #F9FAFB, Montserrat
   headings. The coral is too light for white text, so buttons use coral with slate text and links use
   a deeper coral. Change colours here in :root. Fonts are self-hosted in public/fonts. */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --bg: #F9FAFB;
  --surface: #FFFFFF;
  --text: #1E293B;         /* slate */
  --muted: #475569;
  --line: #E2E8F0;
  --coral: #FA6559;        /* brand coral: backgrounds with slate text (4.9:1) */
  --coral-hover: #FB8278;   /* lighter on hover keeps slate text readable (5.8:1) */
  --accent: #C8372B;       /* deeper coral for links and text on white (5.2:1) */
  --focus: #1E293B;
  --error: #B42318;
  --radius: 12px;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.4rem); }
h2 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
a:hover { color: var(--text); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--text); color: #fff; padding: 0.5rem 1rem; border-radius: 8px; z-index: 10; }
.skip-link:focus { top: 1rem; color: #fff; }

.container { width: 100%; max-width: 60rem; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 30rem; }
.main { padding-top: 2rem; padding-bottom: 3rem; min-height: 60vh; }
.lead { font-size: 1.15rem; }
.muted { color: var(--muted); }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; min-height: 4rem; padding-block: 0.5rem; }
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--text); letter-spacing: -0.01em; }
.wordmark__dot { color: var(--coral); }
.badge { line-height: 1.5; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: var(--text); color: #fff; padding: 0.15rem 0.5rem; border-radius: 999px; }
.area-admin .site-header { background: var(--text); }
.area-admin .wordmark { color: #fff; }
.area-admin .badge { background: var(--coral); color: var(--text); }
.area-admin .site-header .link-button { color: #fff; }

/* Buttons and forms */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.7rem 1.4rem; border: 0; border-radius: 999px;
  background: var(--coral); color: var(--text); font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--coral-hover); color: var(--text); }
.link-button { background: none; border: 0; padding: 0.5rem 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

.form { margin-top: 1.5rem; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field input {
  width: 100%; min-height: 48px; padding: 0.65rem 0.85rem;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid #8A949E; border-radius: 8px;
}
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 0.95rem; margin: 0.35rem 0 0; }

/* Cards and stats */
.cards { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 48rem) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card p:last-child { margin-bottom: 0; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin: 1.5rem 0; }
@media (min-width: 48rem) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; }
.stat__value { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat__label { color: var(--muted); font-size: 0.95rem; }

.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0; color: var(--muted); font-size: 0.9rem; }

/* Navigation */
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; }
.site-nav a { font-weight: 600; text-decoration: none; }
.area-admin .site-nav a { color: #fff; }
.area-admin .site-nav a:hover { color: var(--coral); }

/* Page parts */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.small { font-size: 0.9rem; }
.hint { color: var(--muted); font-size: 0.95rem; margin: -0.2rem 0 0.4rem; }
.notice { background: #ECFDF3; border: 1px solid #A6E3BF; border-radius: 8px; padding: 0.75rem 1rem; }
.notice--error { background: #FEF3F2; border-color: #F5B5AF; color: var(--error); }
.button--secondary { background: var(--surface); border: 2px solid var(--text); }
.button--secondary:hover { background: var(--bg); }
.card + .card, .site-card { margin-top: 1rem; }

.list { list-style: none; padding: 0; margin: 1rem 0; }
.list__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-bottom: 0.5rem; }
.list__title { font-weight: 700; }
.tag { font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 0.1rem 0.6rem; }
.tag--warn { background: #FEF0C7; color: #7A2E0E; }

.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0 0 1.5rem; }
.details dt { font-weight: 600; }
.details dd { margin: 0; overflow-wrap: anywhere; }

/* Maintenance switch */
.switch { border-left: 4px solid var(--line); padding-left: 1rem; }
.switch--on { border-left-color: #F79009; }
.switch__form { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 0.75rem 0; }

.setup summary { cursor: pointer; list-style: revert; }
.setup summary h2 { display: inline; }
.code { background: var(--text); color: #fff; padding: 0.75rem 1rem; border-radius: 8px; overflow-x: auto; font-size: 0.9rem; }

/* Website studio */
textarea { width: 100%; padding: 0.65rem 0.85rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid #8A949E; border-radius: 8px; resize: vertical; }
textarea[aria-invalid="true"] { border-color: var(--error); }
.undo { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.conversation { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.bubble { max-width: 40rem; padding: 0.8rem 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; }
.bubble--you { align-self: flex-end; background: #FFF1EF; border-color: #FBD0CB; }
.bubble__who { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.25rem; }
.bubble--working { color: var(--muted); }
.tag--starting, .tag--working { background: #E0EAFF; color: #1E3A8A; }
.tag--replied, .tag--needs_review { background: #FEF0C7; color: #7A2E0E; }
.tag--on_preview { background: #DCFAE6; color: #085D3A; }
.tag--nothing { background: var(--line); color: var(--text); }
.tag--failed { background: #FEE4E2; color: #912018; }
.admin-only { margin-top: 2rem; }
.button-row { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; }
.card + h2 { margin-top: 2rem; }

/* Links that leave the portal open in a new tab; the arrow says so. */
a[target="_blank"]::after { content: "\2009\2197"; font-size: 0.85em; text-decoration: none; display: inline-block; }
a.button[target="_blank"]::after { content: none; }

/* Site status */
.status-list { display: grid; grid-template-columns: 1fr; gap: 0.2rem 1rem; margin: 0; }
@media (min-width: 36rem) { .status-list { grid-template-columns: max-content 1fr; } }
.status-list dt { font-weight: 700; margin-top: 0.6rem; }
@media (min-width: 36rem) { .status-list dt { margin-top: 0; } }
.status-list dd { margin: 0 0 0.4rem; display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; align-items: baseline; }
.state { font-weight: 700; }
.state::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; margin-right: 0.4em; background: currentColor; }
.state--good { color: #067647; }
.state--warn { color: #B54708; }
.state--bad { color: var(--error); }
.state--neutral { color: var(--muted); }

/* View as client (admin) */
.view-as-banner { background: #FEF0C7; border-bottom: 1px solid #F7C948; color: #7A2E0E; padding: 0.75rem 0; font-size: 0.95rem; }
.view-as-banner a { color: #7A2E0E; font-weight: 700; }
fieldset.view-as { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.view-as :disabled { opacity: 0.55; cursor: not-allowed; }
.tag--undone { background: var(--line); color: var(--text); }
.undo-change { margin: 1rem 0; }

/* Beta copy of the portal (PORTAL_BETA=true) */
.beta-banner { background: repeating-linear-gradient(135deg, #5B21B6 0 18px, #6D28D9 18px 36px); color: #fff; padding: 0.5rem 0; font-size: 0.95rem; text-align: center; }
.beta-banner strong { letter-spacing: 0.08em; }

/* Images (media library) */
.tag--waiting { background: #E0EAFF; color: #1E3A8A; }
.field select { width: 100%; min-height: 48px; padding: 0.65rem 0.85rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid #8A949E; border-radius: 8px; }
.field input[type="file"] { padding: 0.5rem; }
.check { display: flex; gap: 0.65rem; align-items: flex-start; margin: 0 0 0.85rem; font-weight: 400; }
.check input { width: 1.3rem; height: 1.3rem; min-height: 0; margin-top: 0.15rem; flex: none; accent-color: var(--text); }
.media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); margin: 1.5rem 0; padding: 0; list-style: none; }
.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.media-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #F4F4F5; }
.media-card__body { padding: 0.85rem 1rem 1rem; }
.media-card__name { font-weight: 700; margin: 0 0 0.25rem; }
.media-card__body p { margin: 0 0 0.35rem; font-size: 0.95rem; }
.source-list { padding-left: 1.2rem; }
.source-list li { margin-bottom: 0.35rem; }

/* Site check (admin site page) */
.site-check__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.site-check__head h2 { margin: 0; }
.site-check__where { font-size: 1rem; margin: 1.25rem 0 0.4rem; }
.site-check__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.finding { padding: 0.5rem 0.75rem; border-radius: 8px; border-left: 4px solid var(--line); background: var(--bg); font-size: 0.95rem; }
.finding__level { font-weight: 700; margin-right: 0.35rem; }
.finding--problem { border-left-color: #D92D20; background: #FEF3F2; }
.finding--warning { border-left-color: #F79009; background: #FFFAEB; }
.finding--ok { border-left-color: #12B76A; background: #ECFDF3; }
.finding--info { border-left-color: #2E90FA; background: #EFF8FF; }

/* Help: how to ask for changes */
.tips { padding-left: 1.2rem; margin: 0; }
.tips li { margin-bottom: 0.6rem; }
.examples { display: grid; gap: 1rem; margin: 1rem 0 1.5rem; }
@media (min-width: 48rem) { .examples { grid-template-columns: 1fr 1fr; } }
.example { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.example p { margin: 0 0 0.6rem; }
.example__label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.2rem !important; }
.example__label--no { color: var(--muted); }
.example__label--yes { color: #085D3A; }

/* Set-up steps (admin) */
.setup-steps { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; }
.setup-step { border-left: 5px solid var(--line); }
.setup-step--pass { border-left-color: #12B76A; }
.setup-step--fail { border-left-color: #D92D20; }
.setup-step--warn { border-left-color: #F79009; }
.setup-step__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.setup-step__head h2 { margin: 0; font-size: 1.15rem; }
.setup-step__result { font-weight: 600; }
.tag--setup-pass { background: #DCFAE6; color: #085D3A; }
.tag--setup-fail { background: #FEE4E2; color: #912018; }
.tag--setup-warn { background: #FEF0C7; color: #7A2E0E; }
.tag--setup-todo { background: var(--line); color: var(--text); }
.setup-step pre.code, pre.code { white-space: pre-wrap; word-break: break-all; }

.media-card__manage { margin-top: 0.5rem; border-top: 1px solid var(--line); padding-top: 0.5rem; }
.media-card__manage summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; }
.media-card__form { margin-top: 0.75rem; }
.media-card__form label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.media-card__form .check { font-weight: 400; }
.media-card__row { display: flex; gap: 0.5rem; }
.media-card__row input { flex: 1; min-width: 0; min-height: 44px; padding: 0.4rem 0.6rem; font: inherit; border: 1px solid #8A949E; border-radius: 8px; }

/* Admin error details (resources/views/errors/admin.blade.php) */
.error-details {
    white-space: pre-wrap;
    word-break: break-word;
    background: #f6f6f4;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    user-select: all;
}

/* A group of choices inside a form (e.g. the image credit question) */
fieldset.field { border: 0; margin: 0 0 1.25rem; padding: 0; min-width: 0; }
fieldset.field legend { font-weight: 600; padding: 0; margin-bottom: 0.25rem; }
fieldset.field .check { margin: 0.35rem 0; }

/* Image credit problems found before publishing */
.credit-problems ul { margin: 0.5rem 0 1rem; padding-left: 1.25rem; }

/* "Fetch the photo" from a free image site */
.fetch-photo { margin-bottom: 0.75rem; }
.import-preview { display: block; max-width: 100%; width: 320px; height: auto; border-radius: 8px; margin: 0.5rem 0; }

/* Find a photo */
.find-form__row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.find-form__row input { flex: 1 1 14rem; }
.photo-results { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.photo-result { background: #fff; border: 1px solid #e3e3e0; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.photo-result img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #f3f3f1; }
.photo-result__credit { margin: 0.5rem 0.75rem; }
.photo-result .button { margin: auto 0.75rem 0.75rem; align-self: flex-start; }
.button--small { padding: 0.4rem 0.9rem; font-size: 0.9rem; }
.studio-find { margin: 0.75rem 0 0; }

/* Hosting (20i) panel */
.hosting .cert { display: block; }

/* Plan and billing */
.plan-card h3 { margin-top: 0; }
.plan-card__price { font-size: 1.25rem; font-weight: 600; }

/* Set-up file status */
.badge--ok { background: #1e7a46; color: #fff; }
.badge--bad { background: #b42318; color: #fff; }
.area-admin .badge--ok { background: #1e7a46; color: #fff; }
.area-admin .badge--bad { background: #b42318; color: #fff; }
.setup summary { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.setup summary h2 { margin: 0; }
.secret-status { list-style: none; padding: 0; margin: 1rem 0; }
.secret-status li { margin: 0.4rem 0; }

/* Passkey sign-in (admin) */
.passkey-box { margin-bottom: 1.5rem; }
.passkey-or { font-size: 1rem; margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* Client panel menu: Home · Studio · Files · Help · Settings (scrolls sideways on narrow phones) */
.panel-nav { display: flex; gap: 0.25rem; overflow-x: auto; padding-bottom: 0.6rem; scrollbar-width: none; }
.panel-nav a { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--muted); text-decoration: none; padding: 0.45rem 0.9rem; border-radius: 999px; white-space: nowrap; }
.panel-nav a:hover { background: var(--bg); color: var(--text); }
.panel-nav a[aria-current="page"] { background: #FFF1EF; color: var(--accent); }
@media (max-width: 400px) { .panel-nav a { padding: 0.45rem 0.65rem; } }
.site-picker { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; color: var(--muted); }
.site-picker select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0.25rem 0.5rem; max-width: 14rem; }

/* Client Home: status cards */
.status-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.5rem 0; }
.status-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; display: grid; gap: 0.4rem; align-content: start; }
.status-card__label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.status-card__big { font-family: var(--display); font-weight: 700; font-size: 1.2rem; }
.status-card p { margin: 0; }
.status-card .button { justify-self: start; margin-top: 0.25rem; }
.url-list { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.75rem; font-size: 0.95rem; }
.url-list dt { color: var(--muted); }
.url-list dd { margin: 0; overflow-wrap: anywhere; }
.ask-card { background: #FFF1EF; border-radius: var(--radius); padding: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.ask-card > div { flex: 1 1 18rem; min-width: 0; }
.ask-card h2 { margin: 0 0 0.25rem; }
.ask-card p { margin: 0; }

/* Settings: sections with a list of links beside them */
.settings-layout { display: grid; gap: 1.5rem; grid-template-columns: 12rem minmax(0, 1fr); align-items: start; }
.settings-nav { display: grid; gap: 0.15rem; position: sticky; top: 1rem; }
.settings-nav a { color: var(--muted); text-decoration: none; padding: 0.4rem 0.75rem; border-radius: 8px; font-weight: 600; }
.settings-nav a:hover { background: var(--surface); color: var(--text); }
.settings-sections { display: grid; gap: 1rem; min-width: 0; }
.settings-sections .card { margin: 0; scroll-margin-top: 1rem; }
@media (max-width: 720px) {
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; display: flex; flex-wrap: wrap; gap: 0.35rem; }
    .settings-nav a { background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; padding: 0.3rem 0.7rem; }
}

/* Studio: Tips for asking, open on the first visit */
.tips-box { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 1rem; margin: 0 0 1rem; }
.tips-box summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.tips-box[open] summary { color: var(--accent); margin-bottom: 0.5rem; }
.tips-box ul { margin: 0.25rem 0 0.5rem; padding-left: 1.2rem; }
.tag--good { background: #DCFAE6; color: #085D3A; }
.status-card .tag { justify-self: start; }
.faq { border-top: 1px solid var(--line); padding-block: 0.75rem; }
.faq:first-of-type { border-top: 0; padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 0.5rem 0 0; color: var(--muted); max-width: 65ch; }

/* Files: Images / Documents tabs, and the documents list */
.file-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin: 0.75rem 0 1.25rem; }
.file-tabs a { font-family: var(--display); font-weight: 600; color: var(--muted); text-decoration: none; padding: 0.6rem 0.9rem; border-bottom: 3px solid transparent; }
.file-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--coral); }
.doc-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.75rem; }
.doc { display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.doc__icon { flex: none; width: 2.5rem; height: 3rem; border-radius: 6px; background: #FFF1EF; color: var(--accent); font: 700 0.7rem var(--display); display: grid; place-items: end center; padding-bottom: 0.4rem; }
.doc__body { min-width: 0; flex: 1; display: grid; gap: 0.35rem; }
.doc__body p { margin: 0; }
.doc__name { font-weight: 700; }
.doc__url code { overflow-wrap: anywhere; font-size: 0.85rem; }
.doc__manage summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.doc__manage .form { margin-top: 0.75rem; }
@media (max-width: 420px) { .doc__icon { display: none; } }
.file-picker { margin: 0 0 1rem; }
.file-picker summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.file-picker__list { display: grid; gap: 0.4rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); margin: 0.5rem 0; }
.start-again { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 0.75rem; }
.start-again summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.start-again p { max-width: 65ch; }
.start-again form { display: grid; gap: 0.6rem; justify-items: start; }
.inline-form { display: inline; }

/* Settings → People */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.people { list-style: none; padding: 0; margin: 0 0 1rem; }
.person { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding-block: 0.75rem; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.person__who { display: grid; min-width: 0; flex: 1 1 14rem; }
.person__who span { overflow-wrap: anywhere; }
.person__role { display: flex; gap: 0.5rem; align-items: center; }
.person__role select, .invite select { font: inherit; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.person__remove { flex-basis: 100%; }
.person__remove summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.person__remove form { margin-top: 0.5rem; }
.invite { margin: 0.5rem 0 1.25rem; }
.invite > summary { list-style: none; display: inline-flex; }
.invite > summary::-webkit-details-marker { display: none; }
.invite[open] > summary { margin-bottom: 0.75rem; }
.table-scroll { overflow-x: auto; }
table.roles { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
table.roles th, table.roles td { padding: 0.5rem 0.6rem; border-top: 1px solid var(--line); text-align: center; }
table.roles th[scope="row"], table.roles thead th:first-child { text-align: left; font-weight: 400; }
table.roles thead th { border-top: 0; font-family: var(--display); font-size: 0.85rem; }
table.roles th[scope="row"] { width: 46%; }
@media (max-width: 420px) { table.roles { font-size: 0.85rem; } table.roles th, table.roles td { padding: 0.45rem 0.3rem; } }

/* Admin menu (on the dark header) */
.area-admin .panel-nav a { color: #CBD5E1; }
.area-admin .panel-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.area-admin .panel-nav a[aria-current="page"] { background: var(--coral); color: var(--text); }
.count { display: inline-block; min-width: 1.3em; margin-left: 0.3rem; padding: 0 0.4rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.75rem; line-height: 1.5; text-align: center; }
.area-admin .panel-nav a[aria-current="page"] .count { background: var(--text); }

/* Admin Today: Needs you */
.needs { list-style: none; padding: 0; margin: 0; }
.need { display: flex; align-items: center; gap: 0.75rem 1rem; padding-block: 0.8rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.need:first-child { border-top: 0; padding-top: 0; }
.need__dot { width: 0.65rem; height: 0.65rem; border-radius: 50%; flex: none; }
.need--red .need__dot { background: var(--accent); }
.need--amber .need__dot { background: #B45309; }
.need--blue .need__dot { background: #1D4ED8; }
.need__body { flex: 1 1 14rem; min-width: 0; }
.need__body p { margin: 0; overflow-wrap: anywhere; }
.need__what { font-weight: 600; }

/* Admin: Clients list (stacked cards on phones, columns from 760px) */
.crumb { font-size: 0.95rem; color: var(--muted); }
.crumb a { color: var(--muted); }
.tlist { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 1.25rem; }
.thead { display: none; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem 0.75rem; align-items: center; padding: 0.9rem 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.trow:first-of-type { border-top: 0; }
.trow:hover .t-name strong { text-decoration: underline; }
.t-name { display: grid; gap: 0.1rem; min-width: 0; }
.t-name strong { font-family: var(--display); overflow-wrap: anywhere; }
.t-name small, .t-cell small { color: var(--muted); font-size: 0.85rem; }
.t-status { grid-row: 1; grid-column: 2; justify-self: end; }
.t-facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; font-size: 0.92rem; }
.t-cell { overflow-wrap: anywhere; }
.t-cell::before { content: attr(data-label) " "; color: var(--muted); }
.t-go { display: none; color: var(--muted); font-size: 1.3rem; }
@media (min-width: 760px) {
    .thead { display: grid; gap: 0.75rem; padding: 0.4rem 0 0.6rem; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
    .thead, .trow { grid-template-columns: var(--cols); }
    .trow { gap: 0.75rem; }
    .t-facts { display: contents; }
    .t-cell { display: block; }
    .t-cell::before { content: none; }
    .t-cell small { display: block; }
    .t-status { grid-row: auto; grid-column: auto; justify-self: start; }
    .t-go { display: block; text-align: right; }
    .tlist--clients { --cols: minmax(0, 1.6fr) minmax(0, 1.6fr) 1fr 0.6fr 1.1fr 1rem; }
}
.site-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 1rem; padding-block: 0.75rem; border-top: 1px solid var(--line); }
.site-row:first-of-type { border-top: 0; padding-top: 0; }
.site-row__name { font-weight: 700; margin: 0 0 0.25rem; }

/* Admin: System connections */
.conns { list-style: none; padding: 0; margin: 0; }
.conn { display: grid; gap: 0.3rem; padding-block: 0.9rem; border-top: 1px solid var(--line); }
.conn:first-child { border-top: 0; padding-top: 0; }
.conn p { margin: 0; overflow-wrap: anywhere; }
.conn__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.conn .button-row { margin-top: 0.3rem; }
h1 { overflow-wrap: anywhere; }

/* Credits */
.form-row { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.credit-form { border-top: 1px solid var(--line); padding-top: 0.75rem; margin-top: 0.75rem; }
.credit-form summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.credit-form .form { margin-top: 0.75rem; }
.ledger { list-style: none; padding: 0; margin: 0; }
.ledger li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 0.75rem; padding-block: 0.4rem; border-top: 1px solid var(--line); }
.ledger li > .muted { grid-column: 2; }
.ledger__amount { font-variant-numeric: tabular-nums; font-weight: 700; color: #085D3A; text-align: right; grid-row: span 2; }
.ledger__amount--out { color: var(--text); }
.person__limit { width: 7rem; font: inherit; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 8px; }
.person__usage { flex-basis: 100%; margin: 0; }
.pack-form { border-top: 1px solid var(--line); padding-top: 0.75rem; margin-top: 0.75rem; }
.pack-form h3 { margin-top: 0; }

/* Admin Billing */
.tlist--flat { border: 0; padding: 0; }
@media (min-width: 760px) { .tlist--plans { --cols: minmax(0, 1.4fr) 1.2fr 1fr 0.6fr 1fr 1rem; } }
.extras { list-style: none; padding: 0; margin: 0; }
.extra { padding-block: 0.75rem; border-top: 1px solid var(--line); }
.extra:first-child { border-top: 0; padding-top: 0; }
.extra__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; }
.extra__head p { margin: 0; }
.extra__name { font-weight: 700; }
.extra__edit summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.extra__edit .form { margin-top: 0.6rem; }
.checks { display: grid; gap: 0.25rem 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
