/*
 * Law United — final product polish
 * Load after design-system.css. This layer standardises the established
 * forest / ivory / gold editorial language without changing page behaviour.
 */

:root {
  color-scheme: light;
  --lu-forest-950: #092c23;
  --lu-forest-900: #123f33;
  --lu-forest-800: #174c3d;
  --lu-forest-700: #23644f;
  --lu-forest-100: #e7efe9;
  --lu-forest-050: #f1f5f2;
  --lu-gold-700: #80602f;
  --lu-gold-500: #c19752;
  --lu-gold-200: #e5cfaa;
  --lu-ivory-050: #fffdfa;
  --lu-ivory-100: #faf8f2;
  --lu-ivory-200: #f4f1e9;
  --lu-ink: #172720;
  --lu-ink-soft: #31443c;
  --lu-muted: #596860;
  --lu-line: #d9dcd5;
  --lu-line-strong: #bcc8c1;
  --lu-danger: #913f36;
  --lu-focus: #28735d;
  --lu-serif: Georgia, "Times New Roman", serif;
  --lu-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --lu-control: 2.75rem;
  --lu-radius-sm: 0.5rem;
  --lu-radius-md: 0.75rem;
  --lu-radius-lg: 0.875rem;
  --lu-shadow-sm: 0 0.375rem 1.25rem rgba(19, 50, 40, 0.055);
  --lu-shadow-md: 0 0.875rem 2.25rem rgba(19, 50, 40, 0.09);
  --lu-shadow-lg: 0 1.5rem 3.75rem rgba(12, 43, 34, 0.14);
  --lu-reading: 44rem;

  /* Keep legacy and newer components on one palette. */
  --ink: var(--lu-ink);
  --muted: var(--lu-muted);
  --cream: var(--lu-ivory-200);
  --paper: var(--lu-ivory-050);
  --green: var(--lu-forest-900);
  --green2: var(--lu-forest-700);
  --line: var(--lu-line);
  --gold: var(--lu-gold-500);
  --color-ink: var(--lu-ink);
  --color-ink-soft: var(--lu-ink-soft);
  --color-muted: var(--lu-muted);
  --color-muted-light: #69766f;
  --color-canvas: var(--lu-ivory-200);
  --color-surface: var(--lu-ivory-050);
  --color-surface-soft: var(--lu-ivory-100);
  --color-primary: var(--lu-forest-900);
  --color-primary-hover: var(--lu-forest-700);
  --color-primary-soft: var(--lu-forest-100);
  --color-border: var(--lu-line);
  --color-border-strong: var(--lu-line-strong);
  --color-accent: var(--lu-gold-500);
  --color-danger: var(--lu-danger);
  --font-ui: var(--lu-sans);
  --font-editorial: var(--lu-serif);
  --control-height: var(--lu-control);
  --radius-control: var(--lu-radius-sm);
  --radius-card: var(--lu-radius-md);
  --radius-panel: var(--lu-radius-lg);
  --shadow-card: var(--lu-shadow-sm);
  --shadow-raised: var(--lu-shadow-md);
  --text-meta: 0.75rem;
  --text-label: 0.75rem;
}

/* HTML's hidden state is authoritative. Several older component selectors
   set display directly and otherwise make unavailable controls reappear. */
[hidden] {
  display: none !important;
}

.editor-command-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.15em;
}

.article-cover-upload > :is(span, small) {
  display: block;
}

.article-cover-upload > small {
  margin-top: 0.25rem;
}

html {
  min-inline-size: 20rem;
  scroll-padding-top: 6.5rem;
}

body {
  min-inline-size: 20rem;
  background:
    radial-gradient(circle at 50% -12rem, rgba(255, 255, 255, 0.82), transparent 34rem),
    var(--lu-ivory-200);
  color: var(--lu-ink);
  font-family: var(--lu-sans);
  font-size: 0.9375rem;
  line-height: 1.55;
}

::selection {
  background: #d8e7df;
  color: var(--lu-forest-950);
}

:is(h1, h2, h3, p) {
  overflow-wrap: break-word;
}

:is(button, input, select, textarea) {
  font-family: var(--lu-sans);
}

:is(.logged-in,.guest-workspace) small {
  font-size: 0.75rem;
  line-height: 1.4;
}

.auth-card > small,
.auth-divider,
.social-login > small {
  font-size: 0.75rem;
  line-height: 1.4;
}

.auth-card label,
.social-login > span,
.auth-tabs button {
  font-size: 0.8125rem;
}

:is(button, [role="button"], input, select, textarea, a[href]):focus-visible {
  outline: 0.1875rem solid var(--lu-focus);
  outline-offset: 0.1875rem;
}

:is(.jobs-hero, .events-hero, .firms-hero, .colleges-hero, .article-hero, .judgment-app-hero)
  :is(button, [role="button"], a[href], input):focus-visible {
  outline-color: #efc978;
}

:is(input, select, textarea)::placeholder {
  color: #6b7771;
  opacity: 1;
}

:is(button, [role="button"]):disabled,
:is(button, [role="button"])[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

:is(.primary-btn, .outline-btn) {
  min-height: var(--lu-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--lu-radius-sm);
  font-size: 0.875rem;
  font-weight: 750;
  line-height: 1.2;
  transition: background-color 160ms ease, border-color 160ms ease,
    color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.primary-btn {
  background: var(--lu-forest-900);
  color: #fff;
  box-shadow: 0 0.25rem 0.875rem rgba(18, 63, 51, 0.17);
}

.primary-btn:hover:not(:disabled) {
  background: var(--lu-forest-700);
  box-shadow: 0 0.5rem 1.25rem rgba(18, 63, 51, 0.2);
}

.outline-btn {
  border-color: #8da298;
  background: rgba(255, 253, 250, 0.66);
  color: var(--lu-forest-900);
}

.outline-btn:hover:not(:disabled) {
  border-color: #557b6b;
  background: var(--lu-forest-050);
}

:is(.icon-btn, .account-menu-toggle, .drawer-close, .more) {
  border-radius: var(--lu-radius-sm);
}

:is(.icon-btn, .account-menu-toggle, .drawer-close, .more):hover {
  background: var(--lu-forest-050);
  color: var(--lu-forest-800);
}

.eyebrow,
.nav-group-label {
  color: var(--lu-gold-700);
  font-size: var(--text-label);
  font-weight: 850;
  line-height: 1.3;
  letter-spacing: 0.105rem;
  text-transform: uppercase;
}

:is(.identity-chip, .new-label, .drafting-assistant-badge, .badge,
  .career-stats span, .events-stats span, .article-kicker,
  .verified-line, .tag-list span) {
  font-size: 0.75rem;
  line-height: 1.35;
}

:is(.card, .rail-card, .post, .dossier-card, .firm-panel, .college-panel,
  .article-editor-card, .editor-side-card, .judgment-news-card) {
  border-color: var(--lu-line);
  border-radius: var(--lu-radius-md);
  background-color: var(--lu-ivory-050);
}

:is(.firm-card, .college-card, .job-card, .event-card-row, .judgment-news-card) {
  transition: border-color 160ms ease, background-color 160ms ease,
    box-shadow 160ms ease, transform 160ms ease;
}

:is(.firm-card, .college-card, .job-card, .event-card-row, .judgment-news-card):focus-within {
  border-color: #8eaa9c;
  box-shadow: 0 0 0 0.1875rem rgba(40, 115, 93, 0.12), var(--lu-shadow-md);
}

/* Contain each known application surface without hiding document overflow. */
:is(.topbar, .app-shell, .feed, .right-rail, .profile-page, .jobs-page,
  .events-page, .firms-page, .colleges-page, .article-page,
  .article-editor-page, .judgment-app-page, .judgment-reader-layout) > * {
  min-inline-size: 0;
}

:is(.app-shell, .feed, .post, .composer, .dossier-grid, .jobs-body,
  .events-body, .firm-card-grid, .college-card-grid, .article-layout,
  .article-editor-layout, .message-layout, .resume-studio-body,
  .judgment-editorial-grid, .judgment-secondary-grid, .judgment-reader-layout) {
  min-inline-size: 0;
  max-inline-size: 100%;
}

/* Header and primary application navigation. */
:is(.logged-in,.guest-workspace) .topbar {
  border-bottom-color: rgba(206, 213, 207, 0.92);
  background: rgba(255, 253, 250, 0.965);
  box-shadow: 0 0.3rem 1.25rem rgba(18, 48, 39, 0.065);
}

.topbar .brand {
  color: var(--lu-forest-900);
}

.topbar .brand-tagline {
  color: var(--lu-muted);
}

.topbar .search {
  border-color: transparent;
  background: #efeee8;
}

.topbar .search:hover {
  border-color: #d3d9d4;
  background: #f6f5f0;
}

.topbar .search:focus-within {
  border-color: #789789;
  background: #fff;
  box-shadow: 0 0 0 0.1875rem rgba(40, 115, 93, 0.11);
}

.profile-label small,
.account-dropdown small {
  color: var(--lu-muted);
  font-size: 0.75rem;
}

.account-dropdown {
  border-color: var(--lu-line);
  border-radius: 0.75rem;
  box-shadow: var(--lu-shadow-lg);
}

.sidebar {
  border-color: rgba(210, 214, 207, 0.86);
  background: rgba(255, 253, 250, 0.52);
}

.nav-item {
  min-height: 2.75rem;
  border-radius: 0.5rem;
  color: #465b52;
}

.nav-item:hover {
  background: #edf1ec;
  color: var(--lu-forest-900);
}

.nav-item.active {
  background: #e1e9e3;
  color: var(--lu-forest-900);
  box-shadow: inset 0.1875rem 0 var(--lu-forest-700);
}

/* Feed: crisp editorial hierarchy with readable utility metadata. */
.feed .welcome {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 82% 12%, rgba(209, 174, 106, 0.17), transparent 28%),
    linear-gradient(118deg, var(--lu-forest-950), var(--lu-forest-800) 68%, #346658);
  box-shadow: 0 1rem 2.5rem rgba(18, 63, 52, 0.17);
}

.feed .welcome > div > p:last-child {
  color: #d8e3de;
}

.feed .composer {
  border-color: #d3dad5;
  box-shadow: 0 1rem 2.25rem rgba(25, 48, 40, 0.11);
}
.email-verification-banner{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:14px;margin:0 0 18px;padding:15px 17px;border:1px solid #d6bd88;border-left:4px solid var(--lu-gold,#bf9450);border-radius:10px;background:linear-gradient(135deg,#fffaf0,#f7f1e4);box-shadow:0 8px 24px rgba(92,68,30,.08)}
.email-verification-banner[hidden]{display:none}.email-verification-banner>span{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#153f33;color:#fff;font-size:18px;font-weight:800}.email-verification-banner strong{color:#173e33;font-size:14px}.email-verification-banner p{margin:3px 0 0;color:#586a61;font-size:12px;line-height:1.45}.email-verification-banner button,.email-resend-profile{border:1px solid #8fa69b;border-radius:6px;background:#fff;color:#153f33;padding:9px 12px;font-size:12px;font-weight:750;cursor:pointer}.email-resend-profile{width:100%;margin:12px 0 2px}.email-verification-banner button:disabled,.email-resend-profile:disabled{opacity:.6;cursor:wait}
.auth-provider-note{margin:0 0 1rem;padding:.75rem .875rem;border:1px solid #d9c18e;border-left:4px solid var(--lu-gold,#bf9450);border-radius:.5rem;background:#fff8e9;color:#4d5f56;font-size:.75rem;line-height:1.5}.auth-provider-note[hidden]{display:none}
@media(max-width:560px){.email-verification-banner{grid-template-columns:36px 1fr;padding:13px}.email-verification-banner>span{width:36px;height:36px}.email-verification-banner button{grid-column:1/-1;width:100%}}

.feed .composer-prompt {
  color: #52645c;
}

.feed-heading h2 {
  color: var(--lu-ink);
  font-family: var(--lu-serif);
}

.feed-tabs .tab {
  min-height: 2.5rem;
  border-radius: 0.375rem;
  color: var(--lu-muted);
  font-size: 0.8125rem;
}

.feed-tabs .tab.active {
  color: var(--lu-forest-900);
}

.post {
  box-shadow: var(--lu-shadow-sm);
}

.post-copy {
  color: #263b32;
  font-size: 1.0625rem;
  line-height: 1.7;
}

:is(.post-author span, .post-author small, .post-meta,
  .daily article small, .recent-job small, .person small, .person div > span) {
  color: var(--lu-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.post-actions button {
  min-height: 2.75rem;
  border-radius: 0.5rem;
  color: #4f6259;
  font-size: 0.75rem;
}

.post-actions button:hover,
.post-actions button.active {
  background: var(--lu-forest-050);
  color: var(--lu-forest-800);
}

.rail-card {
  box-shadow: var(--lu-shadow-sm);
}

.rail-card h3,
.recent-job strong,
.daily .digest-article strong {
  color: var(--lu-ink);
}

.empty-state {
  color: var(--lu-muted);
  line-height: 1.6;
}

/* Shared directory pages. */
:is(.jobs-hero, .events-hero, .firms-hero, .colleges-hero) {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: var(--lu-forest-900);
  box-shadow: var(--lu-shadow-lg);
}

:is(.jobs-hero, .events-hero, .firms-hero, .colleges-hero) h1 {
  text-wrap: balance;
}

:is(.jobs-hero, .events-hero, .firms-hero, .colleges-hero) > div > p:last-child {
  color: #d6e1dc;
}

:is(.jobs-page .jobs-toolbar, .events-toolbar) {
  border-color: var(--lu-line);
  background: rgba(255, 253, 250, 0.98);
  box-shadow: 0 0.5rem 1.375rem rgba(18, 49, 39, 0.08);
}

:is(.job-search, .event-search, .firms-hero label, .colleges-hero label):focus-within {
  border-color: #6f9385;
  box-shadow: 0 0 0 0.1875rem rgba(40, 115, 93, 0.11);
}

/* Viewport-adaptive workspaces replace the historic fixed 650px panel. */
@media (min-width: 801px) {
  :is(.jobs-page .jobs-body, .events-body) {
    block-size: clamp(26rem, 68dvh, 54rem);
    min-block-size: 0;
    max-block-size: 54rem;
    overflow: hidden;
  }

  :is(.jobs-list, .events-list, .job-detail, .event-detail) {
    min-block-size: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

:is(.job-card h3, .event-card-copy h3, .firm-card h3, .college-card h3) {
  color: var(--lu-ink);
  text-wrap: balance;
}

:is(.job-card p, .event-card-copy > span, .firm-card p,
  .college-card-body > p:not(.eyebrow)) {
  color: var(--lu-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

:is(.job-card footer, .event-card-copy footer, .firm-card-meta,
  .college-card-meta, .event-facts small, .event-facts em) {
  color: var(--lu-muted);
  font-size: 0.75rem;
}

:is(.job-pill, .event-format, .event-card-copy footer i) {
  font-size: 0.75rem;
}

:is(.job-detail-copy, .event-description, .firm-about-copy, .college-about) {
  color: var(--lu-ink-soft);
  font-size: 1rem;
  line-height: 1.72;
}

:is(.firm-card, .college-card) {
  border-color: var(--lu-line);
  box-shadow: var(--lu-shadow-sm);
}

:is(.firm-card, .college-card):hover {
  border-color: var(--lu-line-strong);
  box-shadow: var(--lu-shadow-md);
}

:is(.firm-panel, .college-panel) {
  box-shadow: var(--lu-shadow-sm);
}

/* Profile dossier. */
.dossier-hero {
  border-color: var(--lu-line);
  box-shadow: var(--lu-shadow-md);
}

.dossier-name > p,
.identity-meta,
.details-card label,
.profile-privacy small,
.completeness-card p,
.left-profile-card p,
.availability {
  color: var(--lu-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.name-row h1,
.section-heading h2,
.left-profile-card h3 {
  color: var(--lu-ink);
  text-wrap: balance;
}

.profile-section-nav a {
  min-height: 2.75rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
}

.long-value,
.profile-value.long-value {
  color: var(--lu-ink-soft);
  font-size: 1rem;
  line-height: 1.72;
}

.profile-cover-actions :is(.primary-btn, .outline-btn) {
  min-height: 2.75rem;
  font-size: 0.75rem;
}

/* Article reading and authoring. */
.article-hero h1,
.article-editor-intro h1 {
  text-wrap: balance;
}

.article-content {
  color: #293c34;
  font-size: 1.0625rem;
  line-height: 1.8;
  box-shadow: var(--lu-shadow-sm);
}

.article-content > :is(p, ul, ol, blockquote) {
  max-inline-size: var(--lu-reading);
}

.article-content :is(h2, h3) {
  color: var(--lu-ink);
  text-wrap: balance;
}

.article-content a,
.article-side-card a,
.editor-reference-panel a {
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-contents a,
.article-author-card > p:not(.eyebrow),
.article-side-card,
.article-side-card li,
.article-byline span,
.article-published {
  color: var(--lu-muted);
  font-size: 0.75rem;
}

.article-contents a:hover {
  color: var(--lu-forest-700);
}

:is(.article-editor-card, .editor-side-card, .article-inspiration,
  .article-workflow-nav) {
  border-color: var(--lu-line);
  box-shadow: var(--lu-shadow-sm);
}

.article-editor-card:focus-within {
  border-color: #a7bdb2;
  box-shadow: 0 0 0 0.1875rem rgba(40, 115, 93, 0.09), var(--lu-shadow-md);
}

:is(.editor-title-label, .editor-standfirst-label, .editor-body-label,
  .editor-side-card label, .editor-counts, .editor-toolbar small,
  .article-idea-grid small, .article-workflow-nav small, .seo-card li,
  .seo-tip, .editor-guidelines p:last-child) {
  color: var(--lu-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.editor-toolbar button {
  min-width: 2.5rem;
  min-height: 2.5rem;
}

.editor-body-canvas textarea,
.editor-body-highlight {
  font-size: 1.0625rem;
  line-height: 1.8;
}

/* Judgment desk: preserve the editorial identity while fixing micro-text. */
.judgment-app-hero .judgment-hero-copy h1,
.judgment-featured h2,
.judgment-reader > header h1,
.judgment-reader section > h2,
.judgment-reader section > h3 {
  text-wrap: balance;
}

:is(.judgment-app-top span, .judgment-desk-mark span,
  .judgment-edition > small, .judgment-edition > div span,
  .judgment-section-head small, .judgment-section-head p,
  .judgment-card-meta span, .judgment-card-meta small,
  .judgment-news-card footer b, .judgment-news-card footer span,
  .judgment-toc > small, .judgment-reader-note > small,
  .judgment-toc a, .judgment-toc a span,
  .judgment-reader-meta span, .judgment-source-open) {
  font-size: 0.75rem;
  line-height: 1.45;
}

:is(.judgment-reader-kicker b,
  .judgment-reader section .judgment-category,
  .judgment-reader section .judgment-byline,
  .judgment-reader section .judgment-facts-table strong,
  .judgment-reader section .judgment-table-wrap th,
  .judgment-callout small,
  .judgment-argument-grid article > small,
  .judgment-impact-card > small,
  .judgment-table-precedents td:nth-child(2)) {
  font-size: 0.75rem;
  line-height: 1.45;
}

.judgment-news-card p,
.judgment-edition > p,
.judgment-reader-layout > .judgment-reader-rail .judgment-reader-note p {
  color: var(--lu-muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.judgment-reader section > :is(p, ul, ol) {
  color: #293c34;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.judgment-reader section .judgment-citation {
  border-bottom-color: var(--lu-gold-500);
  color: var(--lu-forest-900);
}

.judgment-reader section .judgment-citation:hover {
  background: #f1e7d4;
  color: var(--lu-forest-700);
}

/* Importer colour roles are semantic emphasis, not a second brand palette. */
.judgment-reader section :is(.judgment-tone-navy, .judgment-tone-teal,
  .judgment-tone-red, .judgment-label-navy > strong,
  .judgment-label-teal > strong, .judgment-label-red > strong) {
  color: var(--lu-forest-800);
}

.judgment-reader section :is(.judgment-tone-gold,
  .judgment-label-gold > strong) {
  color: var(--lu-gold-700);
}

.judgment-reader section > h3 {
  border-left-color: var(--lu-gold-500);
  color: var(--lu-forest-900);
}

.judgment-reader > header h1,
.judgment-reader section > h2,
.judgment-reader section :is(p, li, .judgment-fact, .judgment-facts-table, .judgment-table-wrap) strong,
.judgment-reader section .judgment-table-wrap td:first-child {
  color: var(--lu-forest-900);
}

.judgment-reader-kicker b {
  background: var(--lu-forest-900);
}

.judgment-reader section :is(.judgment-category, .judgment-source-open) {
  color: var(--lu-forest-700);
}

.judgment-reader section button.judgment-citation:focus-visible {
  outline-color: var(--lu-gold-500);
}

.judgment-reader-note {
  border-top-color: var(--lu-forest-700);
}

.judgment-callout-ratio,
.judgment-callout-obiter {
  border-left-color: var(--lu-gold-500) !important;
  background: linear-gradient(120deg, var(--lu-forest-900), var(--lu-forest-700)) !important;
}

.judgment-callout-note {
  border-left-color: var(--lu-gold-500) !important;
}

.judgment-callout-note small,
.judgment-impact-card > small,
.judgment-table-precedents td:nth-child(2) {
  color: var(--lu-forest-800);
}

.judgment-argument-grid article,
.judgment-argument-grid article:nth-child(2) {
  border-top-color: var(--lu-gold-500);
}

/* A reader does not need the library's promotional masthead repeated above it. */
.judgment-app-page:has(.judgment-reader-layout) .judgment-app-hero {
  display: none;
}

.judgment-app-page:has(.judgment-reader-layout) .judgment-app-content {
  border-top: 1px solid var(--lu-line);
  border-radius: var(--lu-radius-lg);
}

:is(.judgment-table-wrap, .article-content .table-wrap) {
  max-inline-size: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

/* Messages. */
.messages-drawer {
  border-left: 1px solid var(--lu-line);
  background: var(--lu-ivory-100);
}

.messages-drawer.open {
  box-shadow: -1.5rem 0 4rem rgba(8, 31, 24, 0.2);
}

.people-list {
  border-color: var(--lu-line);
  background: #f7f6f1;
}

.person-row {
  border-color: #e1e3dc;
}

.person-row:hover,
.person-row.active {
  background: var(--lu-forest-100);
}

:is(.person-row small, .person-row em, .person-row time,
  .chat-header small, .message-bubble footer time, .message-bubble footer span) {
  color: var(--lu-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.message-bubble,
.message-bubble.mine {
  font-size: 0.875rem;
  line-height: 1.5;
}

.message-form input {
  min-height: 2.75rem;
  border-color: var(--lu-line);
  background: #f7f7f2;
}

:is(.chat-tool, .message-form > button:last-child, .chat-header > button) {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

/* Resume studio. */
.resume-studio {
  background: #eeece6;
}

.resume-studio-head,
.resume-studio-footer,
.resume-template-panel {
  border-color: var(--lu-line);
  background: var(--lu-ivory-050);
}

.resume-template-card {
  border-color: var(--lu-line);
  border-radius: var(--lu-radius-sm);
}

.resume-template-card:hover,
.resume-template-card.active {
  border-color: #6e9583;
  box-shadow: 0 0 0 0.1875rem rgba(40, 115, 93, 0.1), var(--lu-shadow-sm);
}

:is(.resume-studio-head span, .template-panel-title small,
  .resume-template-card small, .preview-toolbar, .resume-studio-footer > div span) {
  color: var(--lu-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

:is(.preview-toolbar button, .resume-studio-head > button, .resume-full-close) {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

/* Dialogs, drawers and form surfaces. */
.modal-backdrop {
  background: rgba(7, 28, 22, 0.64);
}

.modal-backdrop > .modal {
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: var(--lu-radius-lg);
  background: var(--lu-ivory-050);
  box-shadow: 0 1.875rem 5.5rem rgba(5, 24, 18, 0.34);
}

.modal-head {
  border-bottom-color: var(--lu-line);
}

.modal-head h2 {
  color: var(--lu-ink);
  font-family: var(--lu-serif);
  text-wrap: balance;
}

.modal-footer {
  border-top-color: var(--lu-line);
}

:is(.job-modal, .firm-modal, .college-modal, .event-modal, .apply-modal)
  :is(label, small, .field-help) {
  color: var(--lu-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

:is(.job-modal, .firm-modal, .college-modal, .event-modal, .apply-modal)
  :is(input, select, textarea) {
  border-color: #c9d1cc;
  background: #fff;
}

/* Tablet: simplify dense side-by-side pages before the phone layout. */
@media (max-width: 1180px) and (min-width: 801px) {
  .article-editor-layout {
    grid-template-columns: minmax(0, 1fr) 19rem;
  }

  .judgment-app-hero {
    gap: 2.5rem;
    padding-inline: 2.5rem;
  }

  .judgment-reader-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Phone and small tablet rules. */
@media (max-width: 800px) {
  :root {
    --lu-control: 2.75rem;
    --control-height: var(--lu-control);
  }

  html {
    scroll-padding-top: 8.5rem;
  }

  body {
    font-size: 0.9375rem;
    line-height: 1.55;
  }

  :is(input, select, textarea) {
    font-size: 1rem;
  }

  :is(button, [role="button"], .primary-btn, .outline-btn,
    .icon-btn, .account-menu-toggle, .more, .connect-btn) {
    min-height: 2.75rem;
  }

  :is(.app-shell, .feed, .profile-page, .jobs-page, .events-page,
    .firms-page, .colleges-page, .article-page, .article-editor-page,
    .judgment-app-page) {
    min-inline-size: 0;
    max-inline-size: 100%;
  }

  :is(.profile-page-top, .jobs-page-top, .events-page-top,
    .firms-page-top, .colleges-page-top, .article-topbar,
    .article-editor-top) {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 0.75rem;
  }

  .feed .welcome {
    min-height: 0;
    padding: 1.375rem 1.25rem 2.75rem;
  }

  .feed .welcome h1 {
    font-size: clamp(1.75rem, 8vw, 2.125rem);
  }

  .feed .composer {
    margin-inline: 0.625rem;
  }

  .post-copy {
    font-size: 1rem;
    line-height: 1.68;
  }

  :is(.jobs-page .jobs-body, .events-body) {
    block-size: auto;
    min-block-size: 0;
    max-block-size: none;
    overflow: visible;
  }

  :is(.job-detail-copy, .event-description, .firm-about-copy,
    .college-about, .article-content, .rich-article-body,
    .judgment-reader section, .judgment-reader section .judgment-label) {
    text-align: start !important;
    hyphens: none;
  }

  :is(.job-detail-copy, .event-description, .firm-about-copy, .college-about) {
    font-size: 0.9375rem;
    line-height: 1.68;
  }

  .profile-page {
    min-inline-size: 0;
  }

  .dossier-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.875rem;
    width: 100%;
    max-width: 100%;
  }

  :is(.dossier-left, .dossier-main, .dossier-side) {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    min-inline-size: 0;
    max-block-size: none;
    width: 100%;
    max-width: 100%;
  }

  :is(.dossier-left, .dossier-main, .dossier-side) > * {
    min-inline-size: 0;
    max-inline-size: 100%;
    margin-block: 0;
  }

  .dossier-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .dossier-name {
    min-inline-size: 0;
  }

  .dossier-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .dossier-stats div {
    min-width: 0;
  }

  .article-content {
    font-size: 1rem;
    line-height: 1.72;
  }

  .article-content :is(table, pre) {
    display: block;
    max-inline-size: 100%;
    overflow-x: auto;
  }

  .word-ribbon,
  .editor-toolbar,
  .word-tabs {
    width: 100%;
    max-width: 100%;
  }

  .word-ribbon {
    overflow: hidden;
  }

  .editor-toolbar,
  .word-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .article-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-editor-sidebar {
    position: static;
  }

  .judgment-app-hero {
    min-height: 0;
  }

  .judgment-reader > header,
  .judgment-reader > section {
    padding-inline: clamp(1.125rem, 5vw, 1.75rem);
  }

  .judgment-reader section > :is(p, ul, ol) {
    font-size: 1rem;
    line-height: 1.72;
  }

  .judgment-table-wrap {
    margin-inline: -0.5rem;
  }

  .messages-drawer {
    border-left: 0;
  }

  .messages-drawer .message-layout {
    min-inline-size: 0;
  }

  .message-bubble,
  .message-bubble.mine {
    max-width: 88%;
    font-size: 0.9375rem;
  }

  /* Restore the studio's two functional rows; responsive.css used block. */
  .resume-studio-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(8.5rem, 22dvh) minmax(0, 1fr);
    min-block-size: 0;
    overflow: hidden;
  }

  .resume-template-panel {
    position: static;
    max-block-size: none;
    overflow: auto;
  }

  .resume-preview-stage {
    min-block-size: 0;
  }

  .resume-preview-scroll {
    min-block-size: 0;
    padding: 0.875rem;
  }

  .modal-backdrop.open {
    align-items: flex-end;
  }

  .modal-backdrop > .modal {
    max-block-size: min(94dvh, 52rem);
  }
}

@media (max-width: 560px) {
  .logged-out .auth-public-header {
    gap: 0.5rem;
    padding-inline: 0.75rem;
  }

  .logged-out .auth-public-header .auth-brand {
    min-width: 0;
  }

  .logged-out .auth-public-header > div {
    flex: 0 0 auto;
    gap: 0.375rem;
  }

  .logged-out .auth-public-header button {
    padding-inline: 0.625rem;
  }

  .logged-out .auth-public-header .auth-signup-link {
    display: none;
  }

  .topbar > * {
    min-inline-size: 0;
  }

  .feed .welcome {
    border-radius: 0.75rem;
  }

  .feed .composer {
    margin-top: -2rem;
  }

  .feed-tabs {
    max-inline-size: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .dossier-identity {
    grid-template-columns: 4.75rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .dossier-avatar {
    width: 4.75rem;
    height: 4.75rem;
  }

  .profile-page,
  .dossier-hero,
  .dossier-grid,
  .dossier-left,
  .dossier-main,
  .dossier-side,
  .dossier-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .name-row h1 {
    font-size: clamp(1.375rem, 7vw, 1.75rem);
  }

  .dossier-stats strong {
    font-size: 1.125rem;
  }

  .dossier-stats span {
    font-size: 0.75rem;
  }

  .article-hero h1,
  .article-editor-intro h1 {
    font-size: clamp(2rem, 10vw, 2.625rem);
  }

  .article-editor-top {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    height: auto;
    min-height: 4rem;
    padding-block: 0.5rem;
    overflow: visible;
  }

  .article-editor-top > button:first-child {
    justify-self: start;
  }

  .editor-top-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .editor-top-status > span,
  .editor-top-status > .editor-zoom {
    grid-column: 1 / -1;
  }

  .editor-top-status > span {
    display: block;
    margin: 0;
    color: var(--lu-muted);
    font-size: 0.75rem;
  }

  .editor-top-status > .editor-zoom {
    justify-self: start;
  }

  .editor-top-status > :is(.primary-btn, .outline-btn) {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding-inline: 0.5rem;
    font-size: 0.75rem;
    white-space: normal;
  }

  .word-ribbon {
    top: 4rem;
  }

  .editor-focus-mode .article-editor-top {
    position: sticky;
    top: 0;
  }

  .editor-focus-mode .word-ribbon {
    top: 0;
  }

  .article-content {
    padding-inline: 1rem;
  }

  .article-content blockquote {
    margin-inline: -0.25rem;
  }

  .judgment-app-content {
    padding-inline: 0.875rem;
  }

  .judgment-app-page:has(.judgment-reader-layout) .judgment-app-content {
    padding-top: 1rem;
  }

  .judgment-reader > header h1 {
    font-size: clamp(1.875rem, 9vw, 2.375rem);
  }

  .judgment-reader section > h2 {
    font-size: 1.5rem;
  }

  .judgment-argument-grid,
  .judgment-impact-grid,
  .judgment-reader-layout > .judgment-reader-rail {
    grid-template-columns: minmax(0, 1fr);
  }

  /* On detail pages, the directory-level row duplicates the local back link. */
  .firms-page:has(.firm-detail:not([hidden])) .firms-page-top,
  .colleges-page:has(.college-detail:not([hidden])) .colleges-page-top {
    display: none;
  }

  .firm-detail:not([hidden]),
  .college-detail:not([hidden]) {
    width: 100%;
    max-width: 100%;
  }

  .firm-profile-cover:not([style]),
  .college-profile-cover:not([style]) {
    height: 6.5rem;
  }

  .firm-directory-back,
  .college-directory-back {
    min-height: 2.75rem;
    margin-block: 0 0.75rem;
  }

  .resume-studio-head {
    min-height: 4.5rem;
    height: auto;
  }

  .resume-studio-footer {
    min-height: 4.25rem;
    height: auto;
    padding-block: 0.625rem;
  }

  .resume-studio-footer button {
    min-height: 2.75rem;
  }
}

.auth-mobile-menu {
  position: relative;
  display: none;
  flex: 0 0 auto;
}

.auth-mobile-menu summary {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid #adc0b6;
  border-radius: 0.375rem;
  color: var(--lu-forest-900, #153f33);
  font-size: 0.75rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.auth-mobile-menu summary::-webkit-details-marker {
  display: none;
}

.auth-mobile-menu > nav {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  z-index: 30;
  display: grid !important;
  width: min(20rem, calc(100vw - 1.5rem));
  padding: 0.75rem;
  border: 1px solid var(--lu-line, #deddd5);
  border-radius: 0.75rem;
  background: #fffdfa;
  box-shadow: 0 1.5rem 4rem rgba(12, 42, 33, 0.2);
}

.auth-mobile-menu > nav a {
  padding: 0.75rem;
  border-top: 1px solid #ecebe5;
  color: #30483f;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-mobile-menu > nav a:first-child {
  border-top: 0;
}

.auth-mobile-menu > nav a:last-child {
  margin-top: 0.5rem;
  border: 1px solid var(--lu-forest-900, #153f33);
  border-radius: 0.375rem;
  background: var(--lu-forest-900, #153f33);
  color: #fff;
  text-align: center;
}

@media (max-width: 900px) {
  .auth-mobile-menu {
    display: block;
  }
}

/* Keep every actionable drawer above the mobile dock, and never let the dock
   cover a drawer's final controls. */
@media (max-width: 800px) {
  body:has(.drawer.open) .mobile-nav {
    display: none;
  }

  /* Let the public directory introduction read as one clear mobile story.
     A later legacy rule otherwise restores the desktop two-column heading. */
  .logged-out .auth-directory-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
  }

  .logged-out .auth-directory-heading > p {
    max-width: 42rem;
    margin: 0;
  }

  .drawer.open {
    z-index: 95;
  }

  /* The legacy desktop grid gave .topnav width:100%, which made the whole
     header 74px wider than small tablets. Keep each mobile header region in
     normal flex sizing; the profile drawer contains the same sign-out action,
     so the redundant desktop chevron can disappear here. */
  .topbar .brand {
    padding-left: 0;
  }

  .topbar .search {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .topbar .topnav {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .topbar .account-menu-toggle {
    display: none;
  }
}

@media (max-width: 390px) {
  .topbar .law-united-wordmark {
    font-size: 1.25rem;
  }

  .post-actions button {
    min-width: 0;
    min-height: 3.25rem;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.35rem 0.125rem;
  }

  .post-actions button span {
    white-space: nowrap;
    line-height: 1.1;
  }
}

/* The editor has six controls; tablets need a composed two-row command bar. */
@media (min-width: 561px) and (max-width: 800px) {
  .article-editor-top {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    width: 100%;
    height: auto;
    min-height: 4.5rem;
    padding: 0.625rem 1rem;
    overflow: visible;
  }

  .article-editor-top > button:first-child {
    justify-self: start;
  }

  .editor-top-status {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
    gap: 0.5rem;
  }

  .editor-top-status > span {
    flex: 1 1 100%;
  }

  .editor-top-status > :is(button, .editor-zoom) {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
  }

  .editor-top-status > button {
    white-space: normal;
  }
}

/* Imported legal material follows the same forest-and-gold brand language as
   the rest of Law United. */
body:is(.logged-in,.guest-workspace) .judgment-argument-grid article {
  border-top-color: var(--lu-gold, #b68b41);
}

body:is(.logged-in,.guest-workspace) .judgment-argument-grid article:nth-child(2),
body:is(.logged-in,.guest-workspace) .judgment-reader-note {
  border-top-color: var(--lu-gold, #b68b41);
}

body:is(.logged-in,.guest-workspace) .judgment-argument-grid article > small,
body:is(.logged-in,.guest-workspace) .judgment-toc a:hover {
  color: var(--lu-forest, #154a3d);
}

/* Legacy feature sheets used 7–11px metadata. Preserve hierarchy while
   keeping meaningful labels readable on ordinary laptop and mobile screens. */
body:is(.logged-in,.guest-workspace) :is(small, label),
body.logged-out :is(small, label),
body:is(.logged-in,.guest-workspace) :is(.eyebrow, .badge, .status-pill, .job-pill, .post-meta),
body.logged-out :is(.auth-divider, .auth-proof, .auth-directory-grid b,
  .auth-public-footer > span, .auth-public-footer a) {
  font-size: 0.75rem;
}

body:is(.logged-in,.guest-workspace) :is(.verified-tick, .dot) {
  font-size: inherit;
}

@media (hover: none) and (pointer: coarse) {
  :is(button, [role="button"], a.nav-item, a.text-link,
    input, select, .custom-select-trigger, .custom-select-option) {
    min-height: 2.75rem;
    touch-action: manipulation;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  :is(.primary-btn, .outline-btn, .card, .rail-card, .post,
    .firm-card, .college-card, .dossier-card, .judgment-news-card) {
    border: 1px solid CanvasText;
  }

  :is(button, [role="button"], input, select, textarea, a[href]):focus-visible {
    outline: 0.1875rem solid Highlight;
  }
}

@media print {
  body {
    background: #fff;
  }

  :is(.topbar, .sidebar, .right-rail, .mobile-nav, .mobile-more-panel,
    .article-topbar, .judgment-reader-rail) {
    display: none !important;
  }

  :is(.article-page, .article-layout, .article-content,
    .judgment-app-page, .judgment-reader-layout, .judgment-reader) {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}
