:root {
  color-scheme: light;
  --background: #fff;
  --foreground: #111;
  --muted: #666;
  --faint: #8a8a8a;
  --line: #e5e5e5;
  --soft: #fafafa;
  --selected: #f2f2f2;
  --danger: #c00;
  --accent: #86efac;
  --accent-strong: #10b981;
  --accent-ink: #14532d;
  --accent-link: #047857;
  --accent-soft: #ecfdf5;
  --verified: #166534;
  --verified-soft: #f0fdf4;
  --double: #1d4ed8;
  --double-soft: #eff6ff;
  --double-line: #bfdbfe;
  --not-double: #b91c1c;
  --not-double-soft: #fff1f2;
  --not-double-line: #fecdd3;
  --radius: 8px;
  --page: 720px;
  --admin: 1180px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}
form { margin: 0; }
h1, h2, p, dl, dd { margin: 0; }
h1, h2 { letter-spacing: -0.035em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.mobile-shell { width: min(100%, var(--page)); min-height: 100vh; margin: 0 auto; padding: 0 20px; }
.site-header, .admin-header, .auth-shell > header {
  height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.brand-mark { position: relative; width: 19px; height: 19px; border: 1px solid #4ade80; border-radius: 6px; background: var(--accent); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; top: 5px; width: 1px; height: 8px; background: var(--accent-ink); }
.brand-mark::before { left: 6px; }
.brand-mark::after { right: 6px; }
.header-actions { display: flex; align-items: center; gap: 16px; color: var(--muted); }
.account-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--foreground); }
.text-link, .text-button { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content:center; padding: 0; border: 0; background: transparent; color: var(--muted); }
.text-link:hover, .text-button:hover, .back-link:hover { color: var(--foreground); }
.icon-button {
  width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: 50%; font-size: 22px; font-weight: 300; line-height: 1;
}
.icon-button:hover { border-color: var(--accent-strong); background: var(--accent-soft); color: var(--accent-link); }

.notice { margin: 0 0 20px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.notice-error { border-color: var(--danger); color: var(--danger); background: transparent; }

.search-section { margin: 12px 0 8px; padding: 16px; border: 1px solid #d1fae5; border-radius: 12px; background: var(--accent-soft); }
.search-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.search-field { position: relative; min-width: 0; }
.search-field input, .auth-form input, .entity-form input, .entity-form select, .entity-form textarea, .comment-composer textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--background); outline: none;
}
.search-field input { height: 46px; padding: 0 14px 0 42px; }
.search-field input:focus, .auth-form input:focus, .entity-form input:focus, .entity-form select:focus, .entity-form textarea:focus, .comment-composer textarea:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong); }
.search-icon { position: absolute; left: 16px; top: 14px; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; color: var(--muted); }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 1.5px; background: currentColor; right: -5px; bottom: -2px; transform: rotate(45deg); transform-origin: left; }
.search-form button, .primary-button, .secondary-button, .outlined-link {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); padding: 0 16px; font-weight: 500;
}
.search-form button, .primary-button { border: 1px solid #4ade80; background: var(--accent); color: var(--accent-ink); }
.search-form button:hover, .primary-button:hover { border-color: var(--accent-strong); background: #6ee7a0; }
.search-form button:active, .primary-button:active { background: #4ade80; }
.search-form button:disabled, .primary-button:disabled { cursor: not-allowed; opacity: .55; }
.secondary-button, .outlined-link { border: 1px solid var(--line); background: transparent; }
.secondary-button:hover, .outlined-link:hover { background: var(--soft); }
[hidden] { display: none !important; }
.filter-trigger {
  width: 100%; min-height: 44px; display: grid; grid-template-columns: auto minmax(0,1fr) 14px; align-items: center; gap: 10px;
  margin-top: 8px; padding: 0; border: 0; border-top: 1px solid #d1fae5; background: transparent; color: var(--foreground); text-align: left;
}
.filter-trigger:hover { color: var(--accent-link); }
.filter-summary { overflow: hidden; color: var(--muted); font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.filter-chevron { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 160ms ease; }
.filter-trigger[aria-expanded="true"] .filter-chevron { transform: translateY(2px) rotate(225deg); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 4px; }
.filter { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; }
.filter:hover { border-color: #86efac; background: var(--accent-soft); color: var(--accent-link); }
.filter.is-active { border-color: #4ade80; background: var(--accent); color: var(--accent-ink); }

.institution-list { padding-bottom: 32px; }
.institution-row { position: relative; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.institution-row:hover { background: var(--soft); }
.institution-row:hover .institution-heading h2 { color: var(--accent-link); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.institution-avatar { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 13px; font-weight: 500; background: var(--soft); }
.institution-copy { min-width: 0; }
.institution-heading { display: flex; align-items: center; gap: 9px; min-width: 0; }
.institution-heading h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; line-height: 1.3; font-weight: 550; }
.verified { flex: 0 0 auto; padding: 2px 7px; border: 1px solid #22c55e; border-radius: 999px; color: var(--verified); background: var(--verified-soft); font-size: 11px; line-height: 1.4; font-weight: 500; }
.institution-copy > p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.institution-meta { margin-top: 5px; font-size: 12px; font-weight: 500; }
.row-arrow { align-self: center; color: var(--faint); font-family: var(--font-mono); }

@media (min-width: 520px) {
  .institution-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: center; }
  .institution-heading, .institution-copy > p { grid-column: 1; }
  .institution-meta { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; white-space: nowrap; }
}

@media (min-width: 760px) {
  .mobile-shell { padding: 0 24px; }
  .search-section { margin-top: 24px; padding: 20px; }
  .institution-row { padding: 18px 12px; }
  .schedule-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .schedule-grid > div, .schedule-grid > div:nth-child(odd), .schedule-grid > div:nth-child(even) { padding: 16px; border-left: 1px solid var(--line); }
  .schedule-grid > div:first-child { padding-left: 0; border-left: 0; }
}
.empty-state { padding: 72px 12px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--foreground); font-size: 16px; }
.empty-state p { margin-top: 6px; }
.empty-state.compact { padding: 40px 12px; }

.detail-page .site-header { height: 64px; }
.detail-page .notice { margin-bottom: 8px; }
.back-link { min-height: 44px; display: inline-flex; align-items: center; margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.company-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 10px 0; border-top: 1px solid var(--foreground); border-bottom: 1px solid var(--line); }
.company-main { min-width: 0; }
.company-title { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.company-title h1 { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: 0; }
.company-main > p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.company-main .company-summary { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-record { display: grid; justify-items: end; gap: 3px; white-space: nowrap; }
.company-record > span { color: var(--faint); font-size: 11px; }
.company-record strong { font-size: 13px; font-weight: 550; }
.company-record a { min-height: 32px; display: inline-flex; align-items: center; color: var(--accent-link); font-size: 11px; }
.company-weekend-status, .comment-choice { display: inline-flex; width: fit-content; align-items: center; border: 1px solid; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.company-weekend-status { min-height: 28px; padding: 3px 10px; font-size: 12px; }
.is-double { color: var(--double); }
.is-not-double { color: var(--not-double); }
.company-weekend-status.is-double, .comment-choice.is-double { border-color: var(--double-line); background: var(--double-soft); color: var(--double); }
.company-weekend-status.is-not-double, .comment-choice.is-not-double { border-color: var(--not-double-line); background: var(--not-double-soft); color: var(--not-double); }

.confidence-section { padding: 16px 0 18px; border-bottom: 1px solid var(--line); }
.confidence-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.confidence-heading h2 { font-size: 16px; line-height: 1.4; font-weight: 600; letter-spacing: 0; }
.confidence-heading > span { color: var(--muted); font-size: 12px; }
.weekend-meter-labels { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 5px; font-size: 12px; }
.weekend-meter-labels > span { display: inline-flex; align-items: baseline; gap: 5px; }
.weekend-meter-labels small { font-size: inherit; }
.weekend-meter-labels strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.weekend-meter progress { width: 100%; height: 8px; display: block; appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--not-double-soft); }
.weekend-meter progress::-webkit-progress-bar { background: var(--not-double-soft); }
.weekend-meter progress::-webkit-progress-value { background: var(--double-soft); border-right: 1px solid var(--double-line); }
.weekend-meter progress::-moz-progress-bar { background: var(--double-soft); border-right: 1px solid var(--double-line); }
.weekend-meter:not(.is-empty) progress { box-shadow: inset 0 0 0 1px var(--not-double-line); }
.weekend-meter.is-empty progress, .weekend-meter.is-empty progress::-webkit-progress-bar { background: var(--soft); }
.detail-hero { padding: 16px 0 42px; border-bottom: 1px solid var(--line); }
.detail-heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.detail-location, .section-heading p, .admin-section-heading p { color: var(--muted); font-size: 13px; }
.detail-heading h1 { margin-top: 4px; font-size: clamp(34px, 10vw, 54px); line-height: 1; font-weight: 600; }
.verified-large { margin-top: 24px; padding: 4px 9px; }
.detail-summary { max-width: 580px; margin-top: 22px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.schedule-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 34px; border-top: 1px solid var(--line); }
.schedule-grid > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.schedule-grid > div:nth-child(odd) { padding-right: 16px; }
.schedule-grid > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.schedule-grid dt { color: var(--muted); font-size: 12px; }
.schedule-grid dd { margin-top: 4px; font-size: 15px; }
.detail-hero .outlined-link { margin-top: 20px; }
.comments-section { padding: 20px 0 24px; }
.section-heading h2 { font-size: 18px; line-height: 1.4; font-weight: 600; letter-spacing: 0; }
.comment-composer { margin-top: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.comment-composer label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.comment-composer textarea { min-height: 84px; resize: vertical; padding: 11px 12px; line-height: 1.5; }
.detail-page .empty-state.compact { padding: 24px 12px; }
.weekend-choice { margin: 0 0 12px; padding: 0; border: 0; }
.weekend-choice legend { margin-bottom: 7px; font-size: 13px; font-weight: 500; }
.weekend-choice legend span { margin-left: 4px; color: var(--faint); font-size: 11px; font-weight: 400; }
.weekend-choice > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.weekend-choice-admin > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.weekend-choice label { min-height: 44px; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 12px; border: 1px solid; border-radius: var(--radius); cursor: pointer; }
.weekend-choice input { width: 16px; height: 16px; margin: 0; }
.weekend-choice .choice-double { border-color: var(--double-line); background: var(--double-soft); color: var(--double); }
.weekend-choice .choice-not-double { border-color: var(--not-double-line); background: var(--not-double-soft); color: var(--not-double); }
.weekend-choice .choice-neutral { border-color: var(--line); background: var(--soft); color: var(--muted); }
.weekend-choice .choice-verified { border-color: #86efac; background: var(--verified-soft); color: var(--verified); }
.weekend-choice .choice-double input { accent-color: var(--double); }
.weekend-choice .choice-not-double input { accent-color: var(--not-double); }
.weekend-choice .choice-verified input { accent-color: var(--verified); }
.weekend-choice label:has(input:checked) { box-shadow: inset 0 0 0 1px currentColor; }
.weekend-choice label:has(input:focus-visible) { outline: 2px solid currentColor; outline-offset: 2px; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.composer-footer span { color: var(--faint); font: 12px/1 var(--font-mono); }
.login-prompt { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 16px 0 24px; border-bottom: 1px solid var(--line); color: var(--muted); }
.comment-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-item header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.comment-item header > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.comment-item header strong { font-size: 14px; font-weight: 550; }
.comment-item header span, .comment-item time { color: var(--faint); font: 11px/1.4 var(--font-mono); }
.comment-item header .comment-choice { min-height: 22px; padding: 2px 7px; font-family: var(--font-sans); }
.comment-item > p { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.comment-item footer { display: flex; gap: 14px; margin-top: 12px; }
.comment-item footer a, .comment-item footer button { min-height: 44px; display: inline-flex; align-items: center; border: 0; padding: 0; background: transparent; color: var(--muted); font-size: 12px; }

.site-footer { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--faint); font-size: 12px; }
.footer-mark { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid currentColor; }

.auth-shell { width: min(100%, 560px); min-height: 100vh; margin: 0 auto; padding: 0 24px; }
.auth-main { padding: clamp(48px, 12vh, 100px) 0 60px; }
.auth-intro { margin-bottom: 34px; }
.kicker { color: var(--muted); font: 12px/1.5 var(--font-mono); }
.auth-intro h1, .form-title h1, .error-main h1 { margin-top: 7px; font-size: clamp(32px, 8vw, 44px); line-height: 1.06; font-weight: 600; }
.auth-intro > p:last-child { max-width: 480px; margin-top: 14px; color: var(--muted); line-height: 1.65; }
.auth-form, .entity-form { display: grid; gap: 18px; }
.auth-form label, .entity-form label { display: grid; gap: 7px; }
.auth-form label > span, .entity-form label > span { font-size: 13px; font-weight: 500; }
.auth-form input, .entity-form input, .entity-form select { height: 44px; padding: 0 12px; }
.entity-form textarea { resize: vertical; padding: 12px; line-height: 1.6; }
.primary-button.full { width: 100%; margin-top: 4px; }
.auth-switch { margin-top: 20px; color: var(--muted); font-size: 13px; }
.auth-switch a { display:inline-flex; align-items:center; min-width:44px; min-height:44px; color: var(--accent-link); text-decoration: underline; text-underline-offset: 3px; }
.comment-composer.standalone { margin-top: 0; border: 0; padding: 0; }
.error-main { padding: 16vh 0 60px; }
.error-main > p:nth-of-type(2) { margin: 16px 0 26px; color: var(--muted); }

.admin-body { background: var(--background); }
.admin-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 24px; padding:10px 0; border-bottom:1px solid var(--line); }
.admin-navigation { display:flex; flex:1 1 420px; flex-wrap:wrap; gap:4px 16px; min-width:0; }
.admin-toolbar .admin-search { flex:0 1 390px; display:flex; gap:8px; margin:0 0 0 auto; min-width:0; }
.admin-toolbar .admin-search input:not([type=hidden]) { flex:1 1 120px; width:120px; min-width:0; }
.admin-toolbar .admin-search select { flex:0 0 auto; width:auto; max-width:120px; }
.admin-toolbar .admin-search button { flex:0 0 auto; }
@media(max-width:850px) {
 .admin-toolbar .admin-search { flex-basis:100%; }
}
.admin-navigation a { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; color:var(--muted); font-size:13px; }
.admin-navigation a[aria-current="page"] { color:var(--accent-link); text-decoration:underline; text-underline-offset:8px; }
.operations-main { padding-bottom:40px; }
.ops-title { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:24px 0; }
.ops-title h1 { font-size:28px; font-weight:600; }
.ops-title h2 { font-size:20px; }
.ops-title > span,.ops-note { color:var(--muted); font-size:12px; }
.ops-note { margin:12px 0; line-height:1.6; }
.ops-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-top:1px solid var(--line); border-left:1px solid var(--line); }
.ops-stats > * { display:grid; gap:12px; padding:20px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.ops-stats span { font-size:12px; color:var(--muted); }
.ops-stats strong { font-size:30px; font-variant-numeric:tabular-nums; }
.ops-health { display:flex; flex-wrap:wrap; gap:20px; padding:24px 0; border-bottom:1px solid var(--line); font-size:13px; }
.ops-health h2 { font-size:16px; }
.ops-health strong { margin-left:8px; }
.ops-filters { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; margin:20px 0; }
.ops-filters input,.ops-filters select,.identity-note input { min-width:0; width:100%; min-height:44px; padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:var(--background); }
.ops-pagination { display:flex; align-items:center; justify-content:center; gap:16px; padding:24px 0; font-size:13px; }
.identity-row { padding:20px 0; border-top:1px solid var(--line); }
.identity-row header { display:flex; align-items:center; justify-content:space-between; }
.identity-row h2 { font-size:17px; }
.identity-row h2 small { font-size:12px; color:var(--muted); }
.identity-row > p { font-size:12px; color:var(--muted); margin:8px 0; }
.identity-actions { display:flex; flex-wrap:wrap; gap:4px 20px; font-size:13px; }
.admin-body .text-link, .admin-body .text-button, .admin-body .row-actions a, .admin-body .row-actions button { min-width:44px; justify-content:center; }
.identity-note { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; margin-top:8px; }
.policy-form { max-width:900px; }
.policy-form fieldset { border:0; border-bottom:1px solid var(--line); margin:0; padding:0 0 24px; min-width:0; }
.policy-form legend { padding:0 0 16px; font-weight:600; font-size:16px; }
.policy-form .check-row { min-height:44px; }
.policy-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.audit-list article { border-top:1px solid var(--line); padding:16px 0; font-size:13px; }
.audit-list article > div { display:flex; justify-content:space-between; gap:16px; }
.audit-list p { color:var(--muted); margin-top:6px; overflow-wrap:anywhere; }
@media(max-width:640px) {
 .ops-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .ops-stats > * { padding:16px; }
 .policy-fields { grid-template-columns:1fr; }
 .ops-filters { grid-template-columns:minmax(0,1fr) auto; }
 .ops-filters input:not([type=hidden]) { grid-column:1 / -1; }
 .ops-title h1 { font-size:24px; }
}
.admin-shell { width: min(calc(100% - 40px), var(--admin)); min-height: 100vh; margin: 0 auto; }
.admin-header { border-bottom: 1px solid var(--line); }
.admin-title { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 52px 0 30px; }
.admin-title h1 { margin-top: 6px; font-size: 42px; line-height: 1; font-weight: 600; }
.admin-identity { color: var(--muted); font: 12px/1.5 var(--font-mono); }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid #bbf7d0; border-radius: 10px; background: var(--accent-soft); }
.stats-grid > div { display: grid; gap: 10px; padding: 20px; border-left: 1px solid var(--line); }
.stats-grid > div:first-child { border-left: 0; }
.stats-grid span { color: var(--muted); font-size: 12px; }
.stats-grid strong { font: 500 30px/1 var(--font-mono); }
.admin-section { padding: 24px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.admin-section-heading h2 { margin-top: 3px; font-size: 26px; font-weight: 550; }
.admin-table-wrap { overflow-x: auto; border-top: 1px solid var(--foreground); }
table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th { color: var(--muted); font-size: 11px; font-weight: 500; }
td strong, td span { display: block; }
td span { max-width: 440px; margin-top: 3px; color: var(--muted); }
.actions-column { text-align: right; }
.row-actions { display: flex; justify-content: flex-end; gap: 12px; white-space: nowrap; }
.row-actions a, .row-actions button { min-height: 44px; display: inline-flex; align-items: center; border: 0; padding: 0; background: transparent; color: var(--muted); font-size: 12px; }
.row-actions a:hover, .row-actions button:hover { color: var(--foreground); text-decoration: underline; text-underline-offset: 3px; }
.comment-cell { max-width: 480px; }
.comment-cell > strong { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.comment-cell strong .comment-choice { display: inline-flex; min-height: 22px; margin: 0; padding: 2px 7px; font-size: 11px; }
.comment-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; width: fit-content; align-items: center; min-height: 24px; margin: 0; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--background); color: var(--muted); font-size: 11px; }
.status-pill.is-verified { border-color: #86efac; background: var(--verified-soft); color: var(--verified); }
.narrow-admin { max-width: 760px; }
.form-title { padding: 10px 0 28px; }
.compact-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.compact-title > p { color: var(--muted); font-size: 12px; white-space: nowrap; }
.entity-form { padding: 28px 0 64px; border-top: 1px solid var(--line); }
.public-entity-form { padding-top: 20px; }
.two-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.entity-form .check-row { display: flex; align-items: center; gap: 9px; }
.entity-form .check-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent-strong); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }

@media (max-width: 760px) {
  .admin-table-wrap { overflow: visible; border-top: 0; }
  .admin-table-wrap table, .admin-table-wrap tbody { display: block; width: 100%; min-width: 0; }
  .admin-table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .admin-table-wrap tbody { display: grid; gap: 12px; }
  .admin-table-wrap tr { display: block; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); overflow: hidden; }
  .admin-table-wrap td { position: relative; display: block; min-height: 48px; padding: 13px 12px 13px 108px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  .admin-table-wrap td:last-child { border-bottom: 0; }
  .admin-table-wrap td::before { content: attr(data-label); position: absolute; left: 12px; top: 14px; width: 82px; color: var(--muted); font-size: 11px; font-weight: 500; }
  .admin-table-wrap td[colspan] { padding-left: 12px; }
  .admin-table-wrap td[colspan]::before { display: none; }
  .admin-table-wrap .row-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px 16px; white-space: normal; }
  .admin-table-wrap td.row-actions { padding-left: 12px; }
  .admin-table-wrap td.row-actions::before { display: none; }
  .admin-table-wrap .comment-cell { max-width: none; }
  .admin-table-wrap .comment-cell span { white-space: normal; }
}

@media (max-width: 640px) {
  .mobile-shell { padding: 0 16px; }
  .site-header { height: 66px; }
  .search-section { margin-top: 4px; padding: 14px; }
  .search-form { grid-template-columns: 1fr; }
  .search-form button { display: none; }
  .institution-row { grid-template-columns: 36px minmax(0,1fr) auto; gap: 10px; padding: 12px 0; }
  .institution-avatar { width: 36px; height: 36px; font-size: 12px; }
  .company-strip { grid-template-columns: 1fr; gap: 10px; }
  .company-record { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
  .company-record > span { width: 100%; }
  .vote-option { min-height: 68px; }
  .schedule-grid { grid-template-columns: 1fr; }
  .schedule-grid > div:nth-child(odd), .schedule-grid > div:nth-child(even) { padding: 14px 0; border-left: 0; }
  .admin-shell { width: min(calc(100% - 28px), var(--admin)); }
  .admin-header { height: 66px; }
  .admin-title { padding-top: 38px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats-grid > div { padding: 16px; border-left: 0; }
  .stats-grid > div:nth-child(even) { border-left: 1px solid var(--line); }
  .stats-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .admin-section { padding: 38px 0; }
  .two-columns { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 420px) {
  .institution-heading { align-items: flex-start; }
  .institution-heading h2 { white-space: normal; }
  .verified { margin-top: 1px; }
  .detail-heading { display: block; }
  .verified-large { display: inline-block; margin-top: 14px; }
  .admin-section-heading { align-items: center; }
  .vote-grid { grid-template-columns: 1fr 1fr; }
  .vote-option { padding: 10px; }
  .vote-label { display: grid; gap: 1px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
