:root {
  color-scheme: light;
  --wine-950: #0a282c;
  --wine-900: #0e3a3f;
  --wine-800: #115157;
  --wine-700: #176b70;
  --wine-100: #e5f2f1;
  --cream-50: #f7f9fa;
  --cream-100: #eef2f3;
  --cream-200: #dbe3e6;
  --ink-900: #172126;
  --ink-800: #26343a;
  --ink-700: #3d4b51;
  --ink-600: #536269;
  --ink-500: #6a787e;
  --sage-700: #287158;
  --sage-600: #34916f;
  --sage-100: #e1f2ea;
  --gold-600: #a66916;
  --gold-700: #87530f;
  --gold-900: #684008;
  --gold-400: #d49a3a;
  --gold-100: #f8edd9;
  --danger-700: #b23a48;
  --danger-100: #fbe9ec;
  --white: #fff;
  --shadow-sm: 0 1px 2px rgb(20 37 43 / 5%), 0 6px 18px rgb(20 37 43 / 4%);
  --shadow-md: 0 16px 38px rgb(20 37 43 / 10%);
  --radius-sm: 7px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --wine-950: #061418;
  --wine-900: #092a2f;
  --wine-800: #55bdb9;
  --wine-700: #81ded8;
  --wine-100: #16363a;
  --cream-50: #081115;
  --cream-100: #0f1b1f;
  --cream-200: #34494f;
  --ink-900: #f3f8f8;
  --ink-800: #e3ebec;
  --ink-700: #d1dcde;
  --ink-600: #b7c5c8;
  --ink-500: #a4b4b9;
  --sage-700: #8cdbbb;
  --sage-600: #57bd95;
  --sage-100: #173a2f;
  --gold-600: #e1ad57;
  --gold-700: #e7b764;
  --gold-900: #f1c97d;
  --gold-400: #efc16f;
  --gold-100: #3a2e1b;
  --danger-700: #f097a0;
  --danger-100: #422329;
  --white: #16262b;
  --shadow-sm: 0 1px 0 rgb(255 255 255 / 3%), 0 8px 24px rgb(0 0 0 / 24%);
  --shadow-md: 0 1px 0 rgb(255 255 255 / 4%), 0 20px 52px rgb(0 0 0 / 34%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  overflow-x: clip;
  color: var(--ink-900);
  background: var(--cream-50);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
button, input, select { max-width: 100%; font: inherit; }
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgb(209 168 92 / 65%);
  outline-offset: 3px;
}
.shell { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: clamp(14px, 2.2vw, 30px); }
.narrow-shell { width: 100%; max-width: 720px; margin: 54px auto 80px; padding-inline: clamp(14px, 2.4vw, 24px); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; background: var(--white); color: var(--wine-800); border-radius: 6px; }
.skip-link:focus { top: 12px; }

.service-notice { position: relative; z-index: 20; color: #5f4310; border-bottom: 1px solid #e6c879; background: #fff4cf; }
.service-notice-inner { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 9px; padding-block: 8px; text-align: center; }
.service-notice-icon { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--gold-600); font-size: .75rem; font-weight: 900; }
.service-notice p { margin: 0; font-size: .78rem; line-height: 1.35; }
.service-notice strong { font-weight: 850; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; }
h1, h2 { font-family: var(--sans); font-weight: 750; }
h1 { letter-spacing: -.035em; }
h2 { letter-spacing: -.025em; }
.eyebrow { margin-bottom: 7px; color: var(--wine-700); font-size: .68rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow-gold { color: var(--gold-400); }
.muted { color: var(--ink-500); }
.optional { color: var(--ink-500); font-size: .78rem; font-weight: 500; }

.site-header { position: sticky; z-index: 10; top: 0; border-bottom: 1px solid var(--cream-200); background: color-mix(in srgb, var(--cream-50) 94%, transparent); backdrop-filter: blur(14px); }
.dedication-strip { color: #eaf7f5; background: var(--wine-900); }
.header-inner { min-height: 60px; display: grid; grid-template-columns: auto minmax(150px, 260px) 1fr; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--wine-800); text-decoration: none; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--wine-800); font-family: var(--serif); font-size: 1.2rem; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .94rem; line-height: 1.1; letter-spacing: -.01em; }
.brand small { margin-top: 2px; color: var(--ink-500); font-size: .67rem; letter-spacing: .025em; }
.header-dedication { min-height: 34px; display: grid; place-items: center; margin: 0 auto; color: inherit; font-family: var(--serif); font-size: clamp(.9rem, 1.4vw, 1.05rem); font-weight: 650; text-align: center; }
.project-switcher { min-width: 0; }
.project-switcher select { width: 100%; min-height: 34px; padding: 6px 30px 6px 10px; overflow: hidden; color: var(--ink-700); border: 1px solid var(--cream-200); border-radius: 8px; background: var(--cream-100); font-size: .72rem; font-weight: 750; text-overflow: ellipsis; cursor: pointer; }
.main-nav { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: .75rem; font-weight: 750; }
.main-nav > a, .nav-button { position: relative; padding: 7px 9px; color: var(--ink-700); border-radius: 7px; text-decoration: none; }
.main-nav > a:hover, .nav-button:hover { color: var(--wine-700); }
.main-nav > a[aria-current="page"] { color: var(--wine-800); background: var(--wine-100); }
.main-nav form { margin: 0; }
.nav-button { border: 0; background: transparent; cursor: pointer; }
.nav-divider { width: 1px; height: 22px; margin-inline: 5px; background: var(--cream-200); }
.public-nav { grid-column: 2 / -1; }
.theme-toggle { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; color: var(--ink-700); border: 1px solid var(--cream-200); border-radius: 999px; background: var(--cream-100); font: inherit; font-size: .72rem; font-weight: 750; cursor: pointer; }
.theme-toggle:hover { color: var(--wine-700); border-color: color-mix(in srgb, var(--wine-700) 45%, var(--cream-200)); }
.theme-icon { width: 14px; text-align: center; }
.theme-icon-light, html[data-theme="dark"] .theme-icon-dark { display: inline-block; }
.theme-icon-dark, html[data-theme="dark"] .theme-icon-light { display: none; }
.auth-theme-toggle { position: fixed; z-index: 30; right: 18px; top: 4px; color: #5f4310; border-color: rgb(95 67 16 / 20%); background: rgb(255 255 255 / 45%); }
.auth-page .service-notice-inner { padding-right: 120px; }

.flash-wrap { margin-top: 20px; }
.flash { display: flex; gap: 11px; align-items: center; padding: 13px 16px; border-radius: 10px; font-size: .9rem; font-weight: 650; box-shadow: var(--shadow-sm); }
.flash-success { color: #254d3c; border: 1px solid #bed7c8; background: #eef7f1; }
.flash-error { color: #7a2530; border: 1px solid #ebc3c8; background: #fff1f2; }
.flash-icon { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--white); background: currentColor; font-size: 0; }
.flash-icon::after { content: "✓"; color: var(--white); font-size: .75rem; }
.flash-error .flash-icon::after { content: "!"; }

.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 8px 15px; border: 1px solid transparent; border-radius: 7px; font-size: .8rem; font-weight: 800; line-height: 1.2; text-decoration: none; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button-primary { color: #fff; background: var(--wine-700); box-shadow: 0 7px 16px rgb(17 81 87 / 16%); }
.button-primary:hover:not(:disabled) { background: var(--wine-800); box-shadow: 0 9px 20px rgb(17 81 87 / 22%); }
.button-light { color: var(--wine-800); background: var(--white); box-shadow: var(--shadow-sm); }
.button-subtle { border-color: rgb(255 255 255 / 25%); background: rgb(255 255 255 / 92%); }
.button-outline { color: var(--wine-700); border-color: #d9c5cf; background: transparent; }
.button-outline:hover:not(:disabled) { border-color: var(--wine-700); background: var(--wine-100); }
.button-danger { color: #fff; border-color: var(--danger-700); background: var(--danger-700); }
.button-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger-700) 84%, #000); }
.button-wide { width: 100%; }
.button-small { min-height: 38px; padding: 8px 14px; font-size: .79rem; }
.button-text-danger { min-height: 34px; padding: 6px 9px; color: var(--danger-700); border: 0; background: transparent; box-shadow: none; }
.button-quiet { color: var(--ink-700); border-color: var(--cream-200); background: var(--cream-100); box-shadow: none; }
.button-quiet:hover:not(:disabled) { color: var(--wine-700); border-color: color-mix(in srgb, var(--wine-700) 40%, var(--cream-200)); background: var(--wine-100); }
.button-tiny { min-height: 30px; padding: 5px 9px; font-size: .68rem; }
.text-link { color: var(--wine-700); font-size: .82rem; font-weight: 800; text-decoration: none; border-bottom: 1px solid #d4afc1; }
.text-link:hover { border-color: var(--wine-700); }

.project-hero, .page-banner { position: relative; color: var(--ink-900); border-bottom: 1px solid var(--cream-200); background: var(--white); }
.project-hero::before, .page-banner::before, .project-hero::after, .page-banner::after { display: none; }
.project-hero-grid { position: relative; z-index: 1; min-height: 182px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; padding-block: 30px; }
.project-hero h1 { max-width: 760px; margin-bottom: 12px; font-size: clamp(2rem, 4vw, 3.2rem); }
.hero-deadline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 0; color: #ebdfe5; font-size: .92rem; }
.calendar-icon { color: var(--gold-400); font-size: 1.25rem; }
.deadline-pill { margin-left: 7px; padding: 5px 9px; color: #f8e8c8; border: 1px solid rgb(209 168 92 / 35%); border-radius: 999px; background: rgb(209 168 92 / 11%); font-size: .72rem; font-weight: 800; }
.pill-late { color: #ffd9dd; border-color: rgb(255 170 180 / 35%); background: rgb(180 52 68 / 20%); }

.dashboard-shell { position: relative; z-index: 2; max-width: 1320px; padding-block: 22px 48px; }
.progress-panel, .content-card { border: 1px solid var(--cream-200); border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); }
.progress-panel { padding: 22px 26px 20px; }
.section-heading-row, .card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 26px; }
.section-heading h2, .card-heading h2 { margin-bottom: 0; font-size: 1.55rem; }
.progress-totals { display: flex; align-items: stretch; gap: 18px; }
.progress-big { display: flex; align-items: baseline; gap: 8px; margin-bottom: 0; color: var(--ink-500); font-size: .77rem; }
.progress-big strong { color: var(--wine-800); font-family: var(--serif); font-size: 2.2rem; font-weight: 500; line-height: 1; }
.progress-big + .progress-big { padding-left: 18px; border-left: 1px solid var(--cream-200); }
.progress-track { height: 13px; margin: 23px 0 16px; overflow: hidden; border-radius: 999px; background: var(--cream-200); }
.progress-claimed { height: 100%; min-width: 0; border-radius: 999px; background: #c7b49a; }
.progress-completed { height: 100%; border-radius: 999px 0 0 999px; background: var(--sage-600); }
.progress-legend { display: flex; flex-wrap: wrap; gap: 15px 28px; color: var(--ink-500); font-size: .78rem; }
.progress-legend span { display: flex; align-items: center; gap: 7px; }
.progress-legend strong { color: var(--ink-700); }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-complete { background: var(--sage-600); }
.dot-claimed { background: #c7b49a; }
.dot-open { background: var(--cream-200); border: 1px solid #d8cdbd; }

.project-overview { padding: 20px 22px 17px; border: 1px solid var(--cream-200); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-sm); }
.project-overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 20px; }
.project-overview-identity { min-width: 0; display: flex; align-items: center; gap: 18px; }
.project-overview-identity > div { min-width: 0; }
.project-overview-photo { width: 92px; height: 108px; flex: 0 0 auto; object-fit: cover; border: 2px solid var(--white); border-radius: 15px; background: var(--cream-100); box-shadow: 0 0 0 1px var(--cream-200), var(--shadow-sm); }
.project-context-row, .project-card-statuses { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.project-context-row .eyebrow { margin-bottom: 0; }
.project-occasion { width: fit-content; padding: 3px 7px; color: var(--gold-900); border: 1px solid color-mix(in srgb, var(--gold-600) 32%, var(--cream-200)); border-radius: 999px; background: var(--gold-100); font-size: .61rem; font-weight: 800; line-height: 1.1; }
.project-overview h1 { max-width: 760px; margin-bottom: 8px; font-size: clamp(1.8rem, 3.2vw, 2.55rem); }
.project-memorial-name { width: fit-content; margin: -1px 0 10px; color: var(--wine-700); font-family: var(--serif); font-size: clamp(1.02rem, 1.8vw, 1.28rem); font-weight: 650; line-height: 1.45; }
.overview-deadline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; color: var(--ink-500); font-size: .8rem; }
.overview-deadline strong { color: var(--ink-700); }
.overview-deadline-hebrew { direction: rtl; justify-content: flex-end; font-size: .84rem; }
.overview-deadline-hebrew > span { white-space: nowrap; }
.overview-deadline-hebrew bdi { font-variant-numeric: tabular-nums; }
.deadline-context { display: inline-flex; align-items: baseline; gap: 4px; }
.deadline-pill { margin-left: 0; padding: 4px 8px; color: var(--wine-800); border: 1px solid color-mix(in srgb, var(--wine-700) 24%, var(--cream-200)); border-radius: 999px; background: var(--wine-100); font-size: .66rem; font-weight: 800; }
.pill-late { color: var(--danger-700); border-color: color-mix(in srgb, var(--danger-700) 32%, var(--cream-200)); background: var(--danger-100); }
.progress-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--cream-200); border-radius: 10px; background: var(--cream-50); }
.progress-metrics article { min-width: 0; display: grid; gap: 7px; padding: 14px 16px; border-right: 1px solid var(--cream-200); }
.progress-metrics article:last-child { border-right: 0; }
.progress-metrics article > span { color: var(--ink-500); font-size: .65rem; font-weight: 750; letter-spacing: .03em; text-transform: uppercase; }
.progress-metrics article > strong { color: var(--ink-900); font-size: 1.5rem; line-height: 1; letter-spacing: -.03em; }
.progress-metrics article > strong small { margin-left: 3px; color: var(--ink-500); font-size: .68rem; font-weight: 650; letter-spacing: 0; }
.progress-overview-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 18px; }
.project-overview .progress-track { height: 9px; margin: 0; }
.progress-overview-row > strong { color: var(--sage-700); font-size: .72rem; }
.project-overview .progress-legend { margin-top: 12px; font-size: .7rem; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 14px; margin-top: 14px; }
.content-card { padding: 20px 22px; }
.card-heading { margin-bottom: 15px; }
.claim-group-list { display: grid; gap: 11px; }
.claim-group-card { overflow: hidden; border: 1px solid var(--cream-200); border-radius: 12px; background: var(--cream-50); }
.claim-group-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 13px 15px 11px; }
.claim-group-heading h3 { margin: 0; font-family: var(--serif); font-size: 1.3rem; }
.claim-group-heading p { margin: 6px 0 0; color: var(--ink-500); font-size: .76rem; }
.hebrew-label { display: inline-block; margin-right: 7px; color: var(--gold-600); font-family: var(--serif); font-size: 1rem; }
.masechta-name-hebrew { width: fit-content; color: var(--ink-900); }
.masechta-name-english { display: block; margin-top: 2px; color: var(--ink-500); font-size: .7rem; font-weight: 700; }
.icon-button { width: 30px; height: 30px; padding: 0; border: 1px solid var(--cream-200); border-radius: 50%; color: var(--ink-500); background: var(--white); cursor: pointer; }
.icon-button:hover { color: var(--danger-700); border-color: #e3c0c5; }
.chapter-status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); border-top: 1px solid var(--cream-200); }
.chapter-status { position: relative; min-width: 0; border-right: 1px solid var(--cream-200); border-bottom: 1px solid var(--cream-200); background: var(--white); }
.chapter-status form:first-child button { width: 100%; min-height: 49px; display: flex; align-items: center; gap: 7px; padding: 8px 25px 8px 10px; color: var(--ink-700); border: 0; background: transparent; font-size: .75rem; font-weight: 750; cursor: pointer; }
.chapter-status.is-complete { background: #eef6f1; }
.chapter-status.is-complete form:first-child button { color: var(--sage-700); }
.archived-chapter-label { width: 100%; min-height: 49px; display: flex; align-items: center; gap: 7px; padding: 8px 10px; color: var(--ink-700); font-size: .75rem; font-weight: 750; }
.status-check { width: 17px; height: 17px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #c4b8ac; border-radius: 50%; color: var(--white); font-size: .65rem; }
.chapter-name { min-width: 0; display: grid; gap: 1px; text-align: left; }
.chapter-name strong { color: var(--ink-900); font-family: var(--serif); font-size: .82rem; line-height: 1.15; }
.chapter-name small { color: var(--ink-500); font-size: .55rem; font-weight: 650; line-height: 1.15; }
.is-complete .status-check { border-color: var(--sage-600); background: var(--sage-600); }
.chapter-release { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); }
.chapter-release button { width: 20px; height: 24px; padding: 0; color: #aaa0a5; border: 0; background: transparent; cursor: pointer; }
.chapter-release button:hover { color: var(--danger-700); }
.empty-state { padding: 28px 15px 18px; text-align: center; }
.empty-state h3 { margin-bottom: 7px; font-family: var(--serif); font-size: 1.35rem; }
.empty-state p { margin-bottom: 18px; color: var(--ink-500); font-size: .86rem; }
.empty-mark { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 50%; color: var(--gold-600); background: var(--gold-100); font-family: var(--serif); font-size: 1.5rem; }

.people-card { height: fit-content; }
.dashboard-aside { display: grid; gap: 14px; }
.my-goal-card .card-heading { align-items: center; margin-bottom: 9px; }
.my-goal-card h2 { font-size: 1.18rem; }
.personal-progress-percent { color: var(--sage-700); font-family: var(--serif); font-size: 1.45rem; }
.personal-progress-lead { margin: 0; color: var(--ink-600); font-size: .72rem; }
.personal-progress-lead strong { color: var(--ink-900); }
.personal-progress-track { height: 7px; margin: 11px 0 13px; overflow: hidden; border-radius: 999px; background: var(--cream-200); }
.personal-progress-track span { height: 100%; display: block; border-radius: inherit; background: var(--sage-600); }
.personal-goal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.personal-goal-stats div { min-width: 0; padding: 8px 6px; border: 1px solid var(--cream-200); border-radius: 7px; background: var(--cream-50); text-align: center; }
.personal-goal-stats dt { color: var(--ink-500); font-size: .52rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.personal-goal-stats dd { margin: 2px 0 0; color: var(--ink-900); font-size: .9rem; font-weight: 850; }
.personal-goal-stats dd small { display: inline; margin-left: 2px; color: var(--ink-500); font-size: .52rem; }
.personal-goal-note { margin: 10px 0 0; color: var(--ink-500); font-size: .63rem; line-height: 1.4; }
.people-list { margin-inline: -5px; }
.person-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 13px 5px; border-bottom: 1px solid var(--cream-200); }
.person-row:last-child { border-bottom: 0; }
.avatar { width: 37px; height: 37px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--wine-700); background: var(--wine-100); font-family: var(--serif); font-size: .9rem; font-weight: 700; }
.avatar:nth-of-type(3n) { color: var(--sage-700); background: var(--sage-100); }
.person-name strong, .person-name small, .person-count small { display: block; }
.person-name strong { font-size: .84rem; }
.person-name small { margin-top: 1px; color: var(--ink-500); font-size: .68rem; }
.person-count { color: var(--sage-700); font-family: var(--serif); font-size: 1.05rem; text-align: right; }
.person-count small { color: var(--ink-500); font-family: var(--sans); font-size: .6rem; }
.assignments-card { margin-top: 18px; }
.archived-notice { margin-bottom: 16px; }
.archived-notice a { color: var(--wine-700); font-weight: 800; }

.projects-shell { max-width: 1320px; display: grid; gap: 18px; }
.project-directory { min-width: 0; }
.project-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.project-card { display: grid; gap: 18px; }
.project-card.is-current { border-color: color-mix(in srgb, var(--wine-700) 48%, var(--cream-200)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--wine-100) 70%, transparent), var(--shadow-sm); }
.project-card.is-archived { background: color-mix(in srgb, var(--cream-100) 65%, var(--white)); }
.project-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.project-card-identity { min-width: 0; display: flex; align-items: flex-start; gap: 12px; }
.project-card-identity > div { min-width: 0; }
.project-card-photo { width: 62px; height: 74px; flex: 0 0 auto; object-fit: cover; border: 1px solid var(--cream-200); border-radius: 10px; background: var(--cream-100); }
.project-card-heading h3 { margin: 8px 0 4px; font-size: 1.25rem; }
.project-card-heading p { margin: 0; color: var(--ink-500); font-size: .74rem; }
.project-card-heading .project-card-memorial { width: fit-content; margin-bottom: 5px; color: var(--wine-700); font-family: var(--serif); font-size: .82rem; font-weight: 650; line-height: 1.4; }
.project-card-heading .project-deadline-primary { width: fit-content; color: var(--ink-700); font-family: var(--serif); font-size: .76rem; }
.project-card-heading .project-deadline-secondary { margin-top: 3px; font-size: .59rem; }
.current-project-mark { color: var(--wine-700); font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.project-card-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--cream-200); border-radius: 9px; background: var(--cream-50); }
.project-card-progress span { min-width: 0; display: grid; gap: 3px; padding: 11px; border-right: 1px solid var(--cream-200); }
.project-card-progress span:last-child { border-right: 0; }
.project-card-progress strong { font-size: .95rem; }
.project-card-progress small { color: var(--ink-500); font-size: .6rem; }
.project-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.project-card-actions form { margin: 0; }
.project-card-actions .archive-project-form, .project-card-actions .archive-visibility-form { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid var(--cream-200); border-radius: 9px; background: var(--cream-50); }
.project-card-actions .archive-project-form .check-row, .project-card-actions .archive-visibility-form .check-row { flex: 1 1 auto; }
.project-card-actions .archive-project-form .check-row strong, .project-card-actions .archive-visibility-form .check-row strong { font-size: .68rem; }
.project-card-actions .archive-project-form .check-row small, .project-card-actions .archive-visibility-form .check-row small { font-size: .55rem; }
.project-delete { position: relative; }
.project-delete > summary { min-height: 38px; display: inline-flex; align-items: center; padding: 8px 11px; color: var(--danger-700); border-radius: 7px; font-size: .72rem; font-weight: 800; cursor: pointer; list-style: none; }
.project-delete > summary::-webkit-details-marker { display: none; }
.project-delete > summary:hover { background: var(--danger-100); }
.project-delete[open] { width: 100%; }
.project-delete-panel { display: grid; gap: 10px; margin-top: 4px; padding: 13px; border: 1px solid color-mix(in srgb, var(--danger-700) 35%, var(--cream-200)); border-radius: 9px; background: var(--danger-100); }
.project-delete-panel p { margin: 0; color: var(--ink-700); font-size: .67rem; line-height: 1.55; }
.project-delete-panel form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; align-items: end; gap: 9px; }
.project-delete-panel label { min-width: 0; font-size: .65rem; }
.project-delete-panel input { width: 100%; min-height: 38px; }
.new-project-card { width: min(720px, 100%); }
.pending-project-invitations { display: grid; gap: 12px; }
.pending-project-invitations > .muted { margin: 0; font-size: .7rem; }
.pending-project-invitation-list { display: grid; gap: 7px; }
.pending-project-invitation-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid var(--cream-200); border-radius: 9px; background: var(--cream-50); }
.pending-project-invitation-list strong, .pending-project-invitation-list small { display: block; }
.pending-project-invitation-list strong { font-size: .78rem; }
.pending-project-invitation-list small { margin-top: 2px; color: var(--ink-500); font-size: .58rem; }
.pending-project-invitation-list form { flex: 0 0 auto; margin: 0; }
.directory-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.directory-metrics article { display: grid; gap: 3px; padding: 17px 19px; border: 1px solid var(--cream-200); border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); }
.directory-metrics strong { color: var(--wine-700); font-size: 1.55rem; line-height: 1; }
.directory-metrics span { color: var(--ink-500); font-size: .66rem; font-weight: 750; }
.owner-directory-shell { max-width: 1280px; display: grid; gap: 14px; }
.directory-heading { align-items: end; }
.directory-search { width: min(350px, 100%); }
.directory-search input { width: 100%; min-height: 40px; padding: 8px 11px; color: var(--ink-900); border: 1px solid var(--cream-200); border-radius: 8px; background: var(--cream-50); font-size: .74rem; }
.directory-note { margin-bottom: 12px; font-size: .7rem; }
.owner-participant-list { display: grid; }
.owner-participant-row { display: grid; grid-template-columns: minmax(190px, .65fr) minmax(0, 1.2fr) auto; align-items: center; gap: 18px; padding: 14px 4px; border-bottom: 1px solid var(--cream-200); }
.owner-participant-row:last-of-type { border-bottom: 0; }
.owner-participant-row[hidden] { display: none; }
.directory-person { min-width: 0; display: flex; align-items: center; gap: 11px; }
.directory-person > span:last-child { min-width: 0; }
.directory-person strong, .directory-person small { display: block; overflow: hidden; text-overflow: ellipsis; }
.directory-person strong { color: var(--ink-700); font-size: .82rem; }
.directory-person small { margin-top: 2px; color: var(--ink-500); font-size: .65rem; }
.project-access-list { min-width: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.project-access-badge { min-width: min(100%, 205px); display: flex; align-items: center; justify-content: space-between; gap: 11px; padding: 8px 9px 8px 11px; color: var(--ink-700); border: 1px solid var(--cream-200); border-radius: 8px; background: var(--cream-50); text-decoration: none; }
.project-access-badge:hover { border-color: color-mix(in srgb, var(--wine-700) 40%, var(--cream-200)); background: var(--wine-100); }
.project-access-badge > span:first-child { min-width: 0; }
.project-access-badge strong, .project-access-badge small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-access-badge strong { font-size: .68rem; }
.project-access-badge small { color: var(--ink-500); font-size: .55rem; }
.project-access-badge.is-archived { opacity: .7; }
.directory-security-action { display: grid; justify-items: end; gap: 4px; }
.directory-security-action form { margin: 0; }
.directory-security-action small { color: var(--ink-500); font-size: .56rem; white-space: nowrap; }
.directory-project-adder { grid-column: 1 / -1; width: 100%; border: 1px solid var(--cream-200); border-radius: 9px; background: var(--cream-50); }
.directory-project-adder > summary { width: fit-content; margin: 8px 10px 8px auto; cursor: pointer; list-style: none; }
.directory-project-adder > summary::-webkit-details-marker { display: none; }
.directory-project-adder[open] > summary { margin-bottom: 0; }
.directory-project-adder form { display: grid; gap: 8px; margin: 8px 10px 10px; padding-top: 12px; border-top: 1px solid var(--cream-200); }
.directory-project-adder form > small { color: var(--ink-500); font-size: .6rem; }
.directory-project-add-grid { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; align-items: end; gap: 10px; }
.directory-project-add-grid label { min-width: 0; }
.directory-profile-editor { grid-column: 1 / -1; width: 100%; border: 1px solid var(--cream-200); border-radius: 9px; background: var(--cream-50); }
.directory-profile-editor > summary { width: fit-content; margin: 8px 10px 8px auto; cursor: pointer; list-style: none; }
.directory-profile-editor > summary::-webkit-details-marker { display: none; }
.directory-profile-editor[open] > summary { margin-bottom: 0; }
.directory-profile-editor form { display: grid; gap: 12px; margin: 8px 10px 10px; padding-top: 12px; border-top: 1px solid var(--cream-200); }
.directory-profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.directory-profile-grid label { min-width: 0; }
.directory-profile-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.directory-profile-footer small { color: var(--ink-500); font-size: .6rem; }
.directory-profile-footer strong { color: var(--ink-700); }
.access-role { flex: 0 0 auto; padding: 3px 6px; color: var(--wine-700); border-radius: 999px; background: var(--wine-100); font-size: .54rem; font-weight: 850; }
.role-owner { color: var(--gold-600); background: var(--gold-100); }
.role-assigned_only { color: var(--ink-500); background: var(--cream-200); }
.empty-directory { margin: 0; padding: 28px 10px 12px; color: var(--ink-500); text-align: center; }
.shared-assignment-list { display: grid; gap: 8px; }
.shared-assignment-card { overflow: hidden; border: 1px solid var(--cream-200); border-radius: 10px; background: var(--white); }
.shared-assignment-row { display: grid; grid-template-columns: minmax(150px, 1.05fr) minmax(130px, .85fr) minmax(180px, 1.2fr) minmax(150px, 1fr) auto; align-items: center; gap: 18px; min-height: 70px; padding: 11px 13px; }
.shared-assignment-row > div { min-width: 0; }
.assignment-person { display: flex; align-items: center; gap: 9px; }
.pending-invitation-badge { width: fit-content; display: block; margin-top: 4px; padding: 3px 6px; color: var(--gold-600); border-radius: 999px; background: var(--gold-100); font-size: .52rem; font-weight: 850; }
.assignment-person > span:last-child, .assignment-masechta, .assignment-portion, .assignment-progress { display: grid; gap: 2px; }
.assignment-person small, .assignment-masechta > small, .assignment-portion > small, .assignment-progress small:first-child { color: var(--ink-500); font-size: .55rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.assignment-person strong, .assignment-masechta > strong, .assignment-portion > strong, .assignment-progress strong { overflow: hidden; color: var(--ink-700); font-size: .73rem; text-overflow: ellipsis; }
.assignment-portion > strong { white-space: normal; }
.assignment-masechta .assignment-name-hebrew,
.assignment-portion .assignment-portion-hebrew { width: fit-content; color: var(--ink-900); font-family: var(--serif); font-size: .92rem; font-weight: 700; line-height: 1.25; }
.assignment-name-english { display: block; overflow: hidden; color: var(--ink-500); font-size: .6rem; font-weight: 650; line-height: 1.25; text-overflow: ellipsis; }
.assignment-progress .mini-progress { width: 100%; margin: 4px 0 0; }
.shared-assignment-card .assignment-toggle { justify-self: end; padding: 7px 8px; border: 1px solid var(--cream-200); border-radius: 7px; background: var(--cream-50); }
.shared-assignment-card .assignment-detail-panel { padding: 14px 16px 16px; border-top: 1px solid var(--cream-200); border-left: 0; background: var(--cream-50); }
.shared-assignment-card .assignment-detail-heading { align-items: center; }
.shared-assignment-card .assignment-detail-heading > div { display: grid; gap: 3px; }
.shared-assignment-card .assignment-detail-heading span { display: block; }
.assignment-table-wrap, .log-table-wrap { overflow-x: auto; }
.assignment-table, .log-table { width: 100%; border-collapse: collapse; font-size: .79rem; }
.assignment-table { table-layout: fixed; }
.assignment-table th, .assignment-table td, .log-table th, .log-table td { padding: 11px 10px; border-bottom: 1px solid var(--cream-200); text-align: left; vertical-align: middle; }
.assignment-table th, .log-table th { color: var(--ink-500); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.assignment-table .col-participant { width: 21%; }
.assignment-table .col-masechta { width: 18%; }
.assignment-table .col-portion { width: 24%; }
.assignment-table .col-progress { width: 22%; }
.assignment-table .col-details { width: 8%; }
.assignment-table .col-admin { width: 7%; }
.participant-cell, .progress-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.participant-cell strong { overflow: hidden; text-overflow: ellipsis; }
.progress-cell { white-space: nowrap; }
.progress-cell strong { color: var(--ink-700); font-size: .7rem; }
.completion-time { display: block; margin-top: 3px; color: var(--ink-500); font-size: .56rem; line-height: 1.25; }
.avatar-small { width: 28px; height: 28px; font-size: .72rem; }
.table-hebrew { display: block; color: var(--gold-600); font-family: var(--serif); font-size: .76rem; }
.mini-progress { width: 65px; height: 6px; display: inline-block; overflow: hidden; margin-right: 7px; border-radius: 99px; background: var(--cream-200); vertical-align: middle; }
.mini-progress i { height: 100%; display: block; border-radius: inherit; background: var(--sage-600); }
.assignment-summary-row form { margin: 0; }
.assignment-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 5px 3px; color: var(--wine-700); border: 0; background: transparent; font-size: .67rem; font-weight: 800; cursor: pointer; }
.assignment-toggle:hover { color: var(--wine-800); }
.assignment-toggle-icon { font-size: .75rem; transition: transform .15s ease; }
.assignment-toggle[aria-expanded="true"] .assignment-toggle-icon { transform: rotate(180deg); }
.assignment-detail-row > td { padding: 0; border-bottom-color: color-mix(in srgb, var(--sage-600) 28%, var(--cream-200)); background: var(--cream-50); }
.assignment-detail-panel { padding: 14px 18px 17px 48px; border-left: 3px solid var(--sage-600); }
.assignment-detail-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.assignment-detail-heading strong { color: var(--ink-700); font-family: var(--serif); font-size: .87rem; }
.assignment-detail-heading span { color: var(--ink-500); font-size: .64rem; font-weight: 750; }
.assignment-detail-title-hebrew { width: fit-content; color: var(--ink-900); font-family: var(--serif); font-size: .88rem; }
.assignment-chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 7px; }
.assignment-chapter { min-height: 57px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 9px 8px 10px; border: 1px solid var(--cream-200); border-radius: 7px; background: var(--white); }
.assignment-chapter-status { min-width: 0; display: grid; gap: 2px; }
.assignment-chapter strong { color: var(--ink-700); font-size: .69rem; }
.assignment-chapter .assignment-chapter-name-hebrew { color: var(--ink-900); font-family: var(--serif); font-size: .78rem; }
.assignment-chapter-name-english { color: var(--ink-500); font-size: .53rem; font-weight: 650; }
.assignment-chapter small { color: var(--ink-500); font-size: .57rem; line-height: 1.3; }
.assignment-chapter.is-complete { border-color: color-mix(in srgb, var(--sage-600) 38%, var(--cream-200)); background: var(--sage-100); }
.assignment-chapter.is-complete small { color: var(--sage-700); }
.assignment-chapter-action { margin: 0; }
.assignment-chapter-action .button { min-width: 46px; }

.page-banner-inner { position: relative; z-index: 1; min-height: 128px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-block: 22px; }
.page-banner-actions { display: flex; align-items: center; gap: 9px; }
.page-banner h1 { margin-bottom: 6px; font-size: clamp(1.75rem, 3vw, 2.35rem); }
.page-banner p:not(.eyebrow) { max-width: 720px; margin-bottom: 0; color: var(--ink-500); font-size: .86rem; }
.page-banner .eyebrow-gold { color: var(--wine-700); }
.page-banner .button-light { color: var(--wine-800); border: 1px solid var(--cream-200); background: var(--cream-50); box-shadow: none; }
.page-banner-small .page-banner-inner { min-height: 116px; }
.page-shell { padding-block: 24px 54px; }
.selection-note { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 24px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--gold-600) 25%, var(--cream-200)); border-radius: 9px; color: var(--ink-700); background: var(--gold-100); font-size: .76rem; }
.selection-note p { margin: 0; }
.note-icon { width: 21px; height: 21px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--white); background: var(--gold-600); font-family: var(--serif); font-weight: 700; }
.batch-claim-toolbar { position: sticky; z-index: 5; top: 96px; display: grid; grid-template-columns: minmax(230px, 1fr) auto minmax(210px, .55fr) auto; align-items: end; gap: 10px 14px; margin-bottom: 24px; padding: 13px 15px; background: color-mix(in srgb, var(--white) 96%, transparent); backdrop-filter: blur(12px); }
.batch-toolbar-intro { display: grid; gap: 2px; }
.batch-toolbar-intro .eyebrow { margin: 0; }
.batch-toolbar-intro > strong { color: var(--ink-900); font-size: .82rem; }
.batch-toolbar-intro > small, .batch-selection-note { color: var(--ink-500); font-size: .58rem; line-height: 1.45; }
.batch-selection-note { grid-column: 1 / -1; padding-top: 7px; border-top: 1px solid var(--cream-200); }
.batch-selection-note strong { color: var(--ink-700); }
.batch-assign-to { width: min(360px, 100%); display: grid; gap: 5px; color: var(--ink-700); font-size: .7rem; font-weight: 800; }
.batch-assign-to select { min-height: 41px; padding: 8px 10px; color: var(--ink-900); border: 1px solid var(--cream-200); border-radius: 7px; background: var(--white); }
.batch-group-toggle[aria-pressed="true"] { color: var(--white); border-color: var(--wine-700); background: var(--wine-700); }
.batch-group-toggle:disabled { opacity: .52; }
.group-toggle-hebrew { padding-inline-start: 4px; border-inline-start: 1px solid currentColor; font-family: var(--serif); font-size: .78rem; }
.seder-list { display: grid; gap: 24px; }
.seder-heading { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-bottom: 11px; padding-bottom: 10px; border-bottom: 1px solid var(--cream-200); }
.seder-heading .eyebrow { margin-bottom: 2px; }
.seder-heading h2 { width: fit-content; margin: 0; font-family: var(--serif); font-size: 1.38rem; }
.seder-heading h2 span { margin-left: 7px; color: var(--gold-600); font-size: 1.1rem; font-weight: 400; }
.seder-title-english { display: block; margin-top: 2px; color: var(--ink-500); font-size: .66rem; font-weight: 700; }
.seder-number { width: 30px; height: 30px; display: grid; place-items: center; color: var(--wine-700); border-radius: 8px; background: var(--wine-100); font-size: .65rem; font-weight: 850; line-height: 1; }
.seder-summary { color: var(--ink-500); font-size: .72rem; }
.seder-heading-actions { display: grid; justify-items: end; gap: 6px; }
.seder-parts { display: grid; gap: 17px; }
.seder-part-section { min-width: 0; }
.seder-part-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; padding: 0 2px 7px; border-bottom: 1px dashed color-mix(in srgb, var(--gold-600) 38%, var(--cream-200)); }
.seder-part-label { min-width: 0; display: flex; align-items: center; gap: 9px; }
.seder-part-label > span:last-child { min-width: 0; }
.seder-part-label strong, .seder-part-label small { display: block; }
.seder-part-label strong { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; color: var(--ink-700); font-size: .72rem; }
.seder-part-label strong bdi { color: var(--wine-700); font-family: var(--serif); font-size: .82rem; }
.seder-part-label small { margin-top: 2px; overflow: hidden; color: var(--ink-500); font-size: .57rem; text-overflow: ellipsis; white-space: nowrap; }
.seder-part-badge { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; color: var(--gold-900); border: 1px solid color-mix(in srgb, var(--gold-600) 34%, var(--cream-200)); border-radius: 7px; background: var(--gold-100); font-size: .65rem; font-weight: 900; }
.tractate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; align-items: start; }
.tractate-card { border: 1px solid var(--cream-200); border-radius: 9px; background: var(--white); box-shadow: var(--shadow-sm); }
.tractate-card[open] { grid-column: span 1; border-color: color-mix(in srgb, var(--wine-700) 35%, var(--cream-200)); box-shadow: var(--shadow-md); }
.tractate-card summary { min-height: 70px; display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; padding: 9px 11px; list-style: none; cursor: pointer; }
.tractate-card summary::-webkit-details-marker { display: none; }
.tractate-card:has([data-batch-tractate]:checked) { border-color: var(--wine-700); box-shadow: inset 0 0 0 1px var(--wine-700), var(--shadow-sm); }
.tractate-whole-select { min-height: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 7px; color: var(--wine-700); border: 1px solid color-mix(in srgb, var(--wine-700) 30%, var(--cream-200)); border-radius: 7px; background: var(--wine-100); font-size: .57rem; font-weight: 850; cursor: pointer; }
.tractate-whole-select input { margin: 0; accent-color: var(--wine-700); }
.tractate-whole-select.is-unavailable { opacity: .46; cursor: not-allowed; }
.tractate-title strong, .tractate-title small { display: block; }
.tractate-title strong { width: fit-content; color: var(--ink-900); font-family: var(--serif); font-size: 1rem; }
.tractate-title small { margin-top: 1px; color: var(--ink-500); font-family: var(--sans); font-size: .64rem; font-weight: 650; }
.tractate-title .tractate-mishnah-count { margin-top: 3px; color: var(--gold-900); font-size: .57rem; font-weight: 800; }
.availability { padding: 4px 7px; border-radius: 999px; color: var(--sage-700); background: var(--sage-100); font-size: .63rem; font-weight: 800; }
.availability.none-left { color: var(--ink-500); background: var(--cream-200); }
.details-chevron { color: var(--ink-500); transition: transform .15s; }
details[open] > summary .details-chevron { transform: rotate(180deg); }
.tractate-body { padding: 0 12px 13px; border-top: 1px solid var(--cream-200); }
.chapter-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; padding-block: 12px; }
.chapter-choice { min-height: 86px; display: grid; place-items: center; align-content: center; gap: 1px; padding-block: 6px; border: 1px solid var(--cream-200); border-radius: 7px; color: var(--ink-700); background: var(--cream-50); cursor: pointer; }
.chapter-choice input { position: absolute; opacity: 0; pointer-events: none; }
.chapter-choice strong, .chapter-choice small { display: block; text-align: center; }
.chapter-choice strong { font-family: var(--serif); font-size: .9rem; }
.chapter-choice small { max-width: 65px; overflow: hidden; color: var(--ink-500); font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
.chapter-choice .chapter-name-english { color: var(--ink-500); font-family: var(--sans); font-size: .5rem; font-weight: 650; }
.chapter-choice .chapter-mishnah-count { margin-block: 2px; color: var(--gold-900); font-size: .54rem; font-weight: 800; }
.chapter-choice:has(input:checked) { color: var(--wine-700); border-color: var(--wine-700); background: var(--wine-100); box-shadow: inset 0 0 0 1px var(--wine-700); }
.chapter-choice.is-taken { color: #80767b; border-style: dashed; background: #f0ece5; cursor: default; }
.chapter-choice.is-taken small { max-width: none; width: 100%; padding-inline: 4px; overflow: visible; line-height: 1.15; text-overflow: clip; white-space: normal; }
.chapter-choice.is-mine { color: var(--sage-700); border-color: #bad0c2; background: var(--sage-100); }
.chapter-choice.is-view-only { cursor: default; opacity: .82; }
.chapter-choice.duplicate-choice { min-height: 82px; border-style: solid; }
.owner-list { width: calc(100% - 8px); color: var(--wine-700) !important; font-weight: 750; }
.claim-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.tractate-body .form-note { margin: 9px 0 0; }
.admin-assignment-bar { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(230px, 1.25fr); align-items: end; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--cream-200); }
.admin-assignment-bar > label:not(.check-row) { display: grid; gap: 5px; color: var(--ink-700); font-size: .7rem; font-weight: 800; }
.admin-assignment-bar select { min-height: 39px; padding: 7px 10px; color: var(--ink-900); border: 1px solid var(--cream-200); border-radius: 7px; background: var(--white); }
.duplicate-check { min-height: 39px; align-items: center; padding: 5px 8px; border: 1px solid var(--cream-200); border-radius: 7px; background: var(--cream-100); }

.settings-card { padding: 19px 20px; }
.account-settings-shell { display: grid; gap: 18px; }
.stack-form { display: grid; gap: 14px; }
.stack-form label:not(.check-row) { display: grid; gap: 6px; color: var(--ink-700); font-size: .76rem; font-weight: 800; }
.stack-form input:not([type="checkbox"]), .stack-form select, .copy-row input { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink-900); border: 1px solid #d9d0c3; border-radius: 8px; background: var(--white); }
.stack-form input[type="file"] { padding: 7px 9px; }
.stack-form input[type="file"]::file-selector-button { margin-right: 10px; padding: 6px 10px; color: var(--wine-700); border: 1px solid var(--cream-200); border-radius: 6px; background: var(--cream-100); font: inherit; font-weight: 800; cursor: pointer; }
.stack-form input:disabled { color: var(--ink-500); background: var(--cream-100); }
.stack-form small { color: var(--ink-500); font-size: .68rem; font-weight: 500; }
.memorial-name-field { display: grid; gap: 6px; }
.memorial-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.memorial-label-row label { color: var(--ink-700); font-size: .76rem; font-weight: 800; }
.hebrew-keyboard-open { flex: 0 0 auto; }
.memorial-photo-editor { display: flex; align-items: center; gap: 13px; padding: 11px; border: 1px solid var(--cream-200); border-radius: 9px; background: var(--cream-50); }
.memorial-photo-editor > img { width: 66px; height: 76px; flex: 0 0 auto; object-fit: cover; border-radius: 8px; }
.memorial-photo-editor .check-row { flex: 1; }
.memorial-photo-field { display: grid; gap: 9px; }
.memorial-photo-field > label { display: grid; gap: 6px; }
.memorial-photo-privacy { margin-top: -3px; color: var(--ink-500); font-size: .64rem; }
.photo-crop-result { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 9px; border: 1px solid color-mix(in srgb, var(--sage-700) 28%, var(--cream-200)); border-radius: 9px; background: var(--sage-100); }
.photo-crop-result[hidden] { display: none; }
.photo-crop-result img { width: 54px; height: 68px; object-fit: cover; border-radius: 7px; background: var(--cream-200); }
.photo-crop-result span { display: grid; gap: 2px; }
.photo-crop-result strong { color: var(--sage-700); font-size: .7rem; }
.photo-crop-result small { color: var(--ink-700); font-size: .59rem; }
.photo-crop-status, .photo-crop-dialog-status { min-height: 1em; margin: 0; color: var(--danger-700); font-size: .64rem; font-weight: 700; }
.photo-crop-status:empty, .photo-crop-dialog-status:empty { min-height: 0; }
.photo-crop-status.is-ready { color: var(--sage-700); }
.photo-crop-dialog-status.is-neutral { color: var(--ink-500); }
.photo-crop-dialog { width: min(520px, calc(100% - 24px)); max-height: 92dvh; margin: auto; padding: 0; overflow: auto; color: var(--ink-900); border: 1px solid var(--cream-200); border-radius: 16px; background: var(--white); box-shadow: var(--shadow-md); }
.photo-crop-dialog::backdrop { background: rgb(10 40 44 / 64%); backdrop-filter: blur(3px); }
.photo-crop-panel { display: grid; gap: 13px; padding: 19px; }
.photo-crop-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.photo-crop-heading .eyebrow { margin-bottom: 3px; }
.photo-crop-heading h2 { margin: 0; font-size: 1.35rem; }
.photo-crop-instructions { margin: 0; color: var(--ink-700); font-size: .7rem; }
.photo-crop-stage { width: min(100%, 320px); aspect-ratio: 4 / 5; justify-self: center; overflow: hidden; border: 2px solid var(--white); border-radius: 12px; outline: 1px solid var(--cream-200); background: var(--ink-900); box-shadow: 0 10px 30px rgb(14 42 46 / 18%); }
.photo-crop-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.photo-crop-stage canvas.is-dragging { cursor: grabbing; }
.photo-crop-stage canvas:focus-visible { outline: 3px solid var(--gold-400); outline-offset: -5px; }
.photo-crop-zoom { display: grid; grid-template-columns: auto minmax(0, 1fr) 45px; align-items: center; gap: 10px; color: var(--ink-700); font-size: .67rem; font-weight: 800; }
.photo-crop-zoom input { width: 100%; accent-color: var(--wine-700); }
.photo-crop-zoom output { color: var(--ink-500); text-align: right; font-size: .62rem; }
.photo-crop-actions { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; }

.hebrew-keyboard { width: min(720px, calc(100% - 24px)); max-height: min(760px, 90dvh); margin: auto; padding: 0; overflow: auto; color: var(--ink-900); border: 1px solid var(--cream-200); border-radius: 16px; background: var(--white); box-shadow: var(--shadow-md); }
.hebrew-keyboard::backdrop { background: rgb(10 40 44 / 58%); backdrop-filter: blur(3px); }
.hebrew-keyboard-panel { display: grid; gap: 14px; padding: 20px; }
.hebrew-keyboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.hebrew-keyboard-heading .eyebrow { margin-bottom: 3px; }
.hebrew-keyboard-heading h2 { margin: 0; font-size: 1.35rem; }
.hebrew-keyboard-preview-label { display: grid; gap: 5px; color: var(--ink-700); font-size: .67rem; font-weight: 800; }
.hebrew-keyboard-preview { width: 100%; min-height: 52px; padding: 10px 13px; color: var(--ink-900); border: 2px solid color-mix(in srgb, var(--wine-700) 48%, var(--cream-200)); border-radius: 9px; outline: none; background: var(--white); font-family: var(--serif); font-size: 1.08rem; line-height: 1.4; }
.hebrew-keyboard-preview:focus { border-color: var(--wine-700); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wine-100) 75%, transparent); }
.hebrew-keyboard-quick, .hebrew-keyboard-marks, .hebrew-keyboard-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.hebrew-keyboard-letters { display: grid; gap: 7px; }
.hebrew-keyboard-row { display: flex; gap: 7px; }
.hebrew-keyboard button[data-hebrew-key], .hebrew-keyboard button[data-hebrew-keyboard-backspace] { min-width: 42px; min-height: 44px; flex: 1 1 42px; padding: 7px 9px; color: var(--ink-900); border: 1px solid var(--cream-200); border-radius: 8px; background: var(--cream-50); font-family: var(--serif); font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.hebrew-keyboard button[data-hebrew-key]:hover, .hebrew-keyboard button[data-hebrew-keyboard-backspace]:hover { color: var(--wine-700); border-color: var(--wine-700); background: var(--wine-100); }
.hebrew-keyboard-quick button[data-hebrew-key] { flex: 0 1 auto; min-width: 68px; font-size: 1rem; }
.hebrew-keyboard-marks button[data-hebrew-key] { flex: 1 1 42px; font-size: 1rem; }
.hebrew-keyboard-actions { align-items: stretch; }
.hebrew-keyboard-actions .hebrew-space-key { min-width: 180px; font-family: var(--sans); font-size: .72rem; }
.hebrew-keyboard-actions button[data-hebrew-keyboard-backspace] { min-width: 130px; font-family: var(--sans); font-size: .72rem; }
.hebrew-keyboard-actions .button { min-width: 86px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.deadline-picker { min-width: 0; display: grid; gap: 10px; margin: 0; padding: 13px; border: 1px solid var(--cream-200); border-radius: 10px; background: var(--cream-50); }
.deadline-picker > legend { padding: 0 5px; color: var(--ink-700); font-size: .76rem; font-weight: 850; }
.calendar-choice { display: inline-grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 8px; background: var(--cream-200); }
.stack-form .calendar-choice label { position: relative; display: block; cursor: pointer; }
.calendar-choice input { position: absolute; opacity: 0; pointer-events: none; }
.calendar-choice span { min-height: 34px; display: grid; place-items: center; padding: 6px 9px; color: var(--ink-500); border-radius: 6px; font-size: .66rem; font-weight: 800; }
.calendar-choice input:checked + span { color: var(--wine-700); background: var(--white); box-shadow: var(--shadow-sm); }
.calendar-choice input:focus-visible + span { outline: 3px solid rgb(209 168 92 / 65%); outline-offset: 2px; }
.calendar-panel { display: grid; gap: 7px; }
.calendar-panel[hidden] { display: none !important; }
.hebrew-date-fields { display: grid; grid-template-columns: .7fr 1.35fr .85fr; gap: 8px; }
.stack-form .hebrew-date-fields input:not([type="checkbox"]), .stack-form .hebrew-date-fields select { min-height: 41px; padding: 8px 9px; }
.calendar-equivalent { margin: 0; color: var(--ink-500); font-size: .65rem; }
.calendar-equivalent strong { color: var(--gold-600); font-family: var(--serif); font-size: .78rem; }
.calendar-error { min-height: 0; margin: 0; color: var(--danger-700); font-size: .64rem; }
.calendar-error:empty { display: none; }
.check-row { display: flex; align-items: flex-start; gap: 11px; color: var(--ink-700); font-size: .78rem; cursor: pointer; }
.check-row input { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--wine-700); }
.check-row strong, .check-row small { display: block; }
.consent-row { padding: 12px; border-radius: 8px; background: var(--cream-100); font-size: .71rem; }
.sms-consent-row a { color: var(--wine-700); font-weight: 800; }
.sms-consent-row input:disabled { opacity: 1; }
.divider { display: flex; align-items: center; gap: 10px; margin-block: 2px; color: var(--ink-500); font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--cream-200); }
.form-actions { display: flex; justify-content: flex-end; padding-top: 5px; }
.form-note { margin: 0; color: var(--ink-500); font-size: .68rem; text-align: center; }
.form-note-left { text-align: left; }

.reminder-builder { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--cream-200); border-radius: 10px; background: var(--cream-50); }
.schedule-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.schedule-section-heading strong, .schedule-section-heading small { display: block; }
.schedule-section-heading strong { color: var(--ink-700); font-size: .77rem; }
.schedule-section-heading small { margin-top: 2px; color: var(--ink-500); font-size: .65rem; font-weight: 500; }
.reminder-rows { display: grid; gap: 7px; }
.reminder-row { display: grid; grid-template-columns: 76px minmax(130px, 1fr) 30px; align-items: center; gap: 7px; }
.stack-form .reminder-row input:not([type="checkbox"]), .stack-form .reminder-row select { min-height: 38px; padding: 7px 9px; background: var(--white); }
.remove-reminder { width: 30px; height: 30px; padding: 0; color: var(--ink-500); border: 1px solid var(--cream-200); border-radius: 50%; background: var(--white); cursor: pointer; }
.remove-reminder:hover { color: var(--danger-700); border-color: color-mix(in srgb, var(--danger-700) 40%, var(--cream-200)); }
.schedule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 2px; }
.schedule-grid > label[hidden] { display: none !important; }
.summary-additional-note { grid-column: 1 / -1; margin: 0 0 2px; padding: 9px 11px; color: var(--ink-500); border-left: 3px solid var(--gold-600); border-radius: 0 6px 6px 0; background: var(--gold-100); font-size: .65rem; }
.summary-additional-note strong { color: var(--ink-700); }

.management-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; padding: 7px; border: 1px solid var(--cream-200); border-radius: 11px; background: var(--white); box-shadow: var(--shadow-sm); }
.management-nav a { min-width: 0; display: grid; gap: 1px; padding: 8px 10px; color: var(--ink-700); border-radius: 7px; text-decoration: none; }
.management-nav a span { font-size: .68rem; font-weight: 850; }
.management-nav a small { overflow: hidden; color: var(--ink-500); font-size: .52rem; text-overflow: ellipsis; white-space: nowrap; }
.management-nav a:hover, .management-nav a:focus-visible, .management-nav a[aria-current="page"] { color: var(--wine-700); background: var(--wine-100); }
.management-nav a[aria-current="page"] small { color: var(--wine-700); }
.admin-shell { max-width: 1280px; display: grid; gap: 14px; }
.admin-section-nav { position: sticky; z-index: 4; top: 96px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 6px; border: 1px solid var(--cream-200); border-radius: 10px; background: color-mix(in srgb, var(--white) 94%, transparent); box-shadow: var(--shadow-sm); }
.admin-section-nav::-webkit-scrollbar { display: none; }
.admin-section-nav a { min-width: 0; display: grid; gap: 1px; padding: 7px 9px; color: var(--ink-700); border-radius: 7px; background: var(--cream-100); text-decoration: none; }
.admin-section-nav a strong { font-size: .66rem; }
.admin-section-nav a small { overflow: hidden; color: var(--ink-500); font-size: .51rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-section-nav a:hover, .admin-section-nav a:focus-visible { color: var(--wine-700); background: var(--wine-100); }
.admin-grid { display: grid; grid-template-columns: 1fr minmax(310px, .75fr); gap: 14px; }
.admin-shell > .content-card, .admin-grid > .content-card { padding: 17px 19px; }
.anchor-target { position: relative; top: -130px; display: block; visibility: hidden; }
.owner-tools-shell { max-width: 1120px; display: grid; gap: 14px; }
.owner-tools-note { margin-bottom: 0; }
.owner-tools-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 14px; }
.owner-tool-card { display: flex; flex-direction: column; gap: 13px; }
.owner-tool-card .card-heading, .recovery-card .card-heading { margin-bottom: 0; }
.owner-tool-card .delivery-status { margin: 0; }
.owner-tool-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; }
.owner-tool-stats div { padding: 12px 10px; border: 1px solid var(--cream-200); border-radius: 8px; text-align: center; background: var(--cream-50); }
.owner-tool-stats dt { color: var(--ink-500); font-size: .62rem; text-transform: uppercase; letter-spacing: .07em; }
.owner-tool-stats dd { margin: 3px 0 0; color: var(--wine-800); font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.owner-tool-action { margin-top: auto; }
.owner-tool-warning { padding-top: 13px; border-top: 1px solid var(--cream-200); line-height: 1.55; }
.recovery-card { margin-top: 0; }
.compact-settings-details { padding: 0; }
.compact-settings-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; list-style: none; cursor: pointer; }
.compact-settings-details > summary::-webkit-details-marker { display: none; }
.compact-settings-details > summary span > span, .compact-settings-details > summary strong { display: block; }
.compact-settings-details > summary .eyebrow { margin-bottom: 2px; }
.compact-settings-details > summary strong { color: var(--ink-900); font-size: .95rem; }
.compact-settings-details[open] > summary { border-bottom: 1px solid var(--cream-200); }
.settings-details-body { padding: 16px 18px 18px; }
.message-trace-link-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; padding: 12px 13px; border: 1px solid var(--cream-200); border-radius: 9px; background: var(--cream-50); }
.message-trace-link-card strong, .message-trace-link-card span { display: block; }
.message-trace-link-card strong { color: var(--ink-800); font-size: .75rem; }
.message-trace-link-card span { margin-top: 2px; color: var(--ink-500); font-size: .62rem; }
.recovery-steps { display: grid; gap: 11px; margin: 18px 0; padding: 0; list-style: none; counter-reset: recovery-step; }
.recovery-steps li { display: grid; grid-template-columns: minmax(145px, .32fr) 1fr; gap: 14px; align-items: start; padding: 12px 14px; border: 1px solid var(--cream-200); border-radius: 8px; background: var(--cream-50); counter-increment: recovery-step; }
.recovery-steps strong::before { content: counter(recovery-step) ". "; color: var(--gold-700); }
.recovery-steps strong { color: var(--ink-800); font-size: .78rem; }
.recovery-steps span { color: var(--ink-600); font-size: .73rem; line-height: 1.55; }
.recovery-steps code, .owner-tool-card code { overflow-wrap: anywhere; }
.generated-link-card { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 30px; padding: 24px 27px; color: var(--white); border-radius: var(--radius-md); background: var(--sage-700); box-shadow: var(--shadow-md); }
.generated-link-card h2 { margin-bottom: 6px; }
.generated-link-card p { margin-bottom: 0; color: #e5eee9; font-size: .78rem; }
.generated-link-card .eyebrow { color: #cfe4d8; }
.generated-link-actions { min-width: 0; display: grid; gap: 9px; }
.generated-link-actions > .button { justify-self: end; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { min-width: 0; color: var(--ink-700); font-size: .72rem; }
.simple-list { display: grid; }
.simple-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 12px; border-bottom: 1px solid var(--cream-200); }
.simple-row:last-child { border-bottom: 0; }
.simple-row strong, .simple-row small { display: block; }
.simple-row strong { font-size: .83rem; }
.simple-row small { color: var(--ink-500); font-size: .68rem; }
.count-badge { padding: 5px 9px; border-radius: 999px; color: var(--wine-700); background: var(--wine-100); font-size: .67rem; font-weight: 800; }
.admin-user-list { display: grid; gap: 9px; margin-top: 20px; }
.admin-user-card { border: 1px solid var(--cream-200); border-radius: 10px; background: var(--cream-50); }
.admin-user-card summary { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 13px 15px; list-style: none; cursor: pointer; }
.admin-user-card summary::-webkit-details-marker { display: none; }
.user-claim-count { color: var(--sage-700); text-align: center; }
.user-claim-count strong, .user-claim-count small { display: block; }
.user-claim-count small { color: var(--ink-500); font-size: .58rem; }
.admin-user-body { position: relative; padding: 18px; border-top: 1px solid var(--cream-200); background: var(--white); border-radius: 0 0 10px 10px; }
.compact-form { gap: 12px; }
.inline-checks { display: flex; flex-wrap: wrap; gap: 20px; }
.form-actions-split { justify-content: flex-start; }
.participant-management-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--cream-200); }
.participant-management-actions form { margin: 0; }
.catalog-search { width: min(360px, 100%); display: grid; gap: 5px; margin: 16px 0; color: var(--ink-700); font-size: .7rem; font-weight: 800; }
.catalog-search input { min-height: 40px; padding: 8px 11px; color: var(--ink-900); border: 1px solid var(--cream-200); border-radius: 8px; background: var(--white); }
.catalog-sedarim { display: grid; gap: 8px; }
.catalog-seder { border: 1px solid var(--cream-200); border-radius: 9px; background: var(--cream-50); }
.catalog-seder > summary { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 11px 13px; list-style: none; cursor: pointer; }
.catalog-seder > summary::-webkit-details-marker { display: none; }
.catalog-seder > summary strong { font-family: var(--serif); font-size: 1rem; }
.catalog-seder > summary > span:not(.details-chevron) { color: var(--ink-500); font-size: .65rem; }
.catalog-name-list { border-top: 1px solid var(--cream-200); }
.catalog-name-row { display: grid; grid-template-columns: minmax(105px, .7fr) minmax(160px, 1fr) minmax(150px, .9fr) auto; align-items: end; gap: 9px; padding: 9px 11px; border-bottom: 1px solid var(--cream-200); background: var(--white); }
.catalog-name-row:last-child { border-bottom: 0; border-radius: 0 0 9px 9px; }
.catalog-name-row[hidden] { display: none; }
.catalog-source strong, .catalog-source small { display: block; }
.catalog-source strong { width: fit-content; color: var(--ink-900); font-family: var(--serif); font-size: .86rem; }
.catalog-source small { margin-top: 2px; color: var(--ink-500); font-family: var(--sans); font-size: .62rem; font-weight: 650; }
.catalog-name-row label { display: grid; gap: 3px; }
.catalog-name-row label span { color: var(--ink-500); font-size: .59rem; font-weight: 750; }
.catalog-name-row input { min-width: 0; min-height: 36px; padding: 6px 8px; color: var(--ink-900); border: 1px solid var(--cream-200); border-radius: 6px; background: var(--cream-50); font: inherit; font-size: .72rem; }
.delivery-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.delivery-status { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--cream-200); border-radius: 9px; color: var(--ink-500); background: var(--cream-50); }
.delivery-status > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-500); background: var(--cream-200); }
.delivery-status strong, .delivery-status small { display: block; }
.delivery-status strong { color: var(--ink-700); font-size: .82rem; }
.delivery-status small { font-size: .66rem; }
.delivery-status.is-ready { color: var(--sage-700); border-color: #c8d9cf; background: #f2f8f4; }
.delivery-status.is-ready > span { color: var(--white); background: var(--sage-600); }
.manual-reminder-panel { margin-top: 18px; padding: 16px; border: 1px solid color-mix(in srgb, var(--wine-700) 30%, var(--cream-200)); border-radius: 10px; background: var(--wine-100); }
.manual-reminders-card { scroll-margin-top: 130px; }
.manual-reminders-card .manual-reminder-panel { margin: 0; padding: 0; border: 0; background: transparent; }
.manual-reminder-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.manual-reminder-heading h2, .manual-reminder-heading h3 { margin: 0; font-size: 1.25rem; }
.manual-reminder-panel > .muted { margin: 8px 0 13px; font-size: .68rem; }
.manual-reminder-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(250px, .8fr) auto; align-items: end; gap: 12px; }
.manual-reminder-grid > label { display: grid; gap: 5px; color: var(--ink-700); font-size: .68rem; font-weight: 800; }
.manual-reminder-grid select { min-height: 41px; padding: 8px 10px; color: var(--ink-900); border: 1px solid var(--cream-200); border-radius: 7px; background: var(--white); }
.manual-channel-choice { min-width: 0; display: flex; gap: 16px; margin: 0; padding: 7px 10px; border: 1px solid var(--cream-200); border-radius: 7px; background: var(--white); }
.manual-channel-choice legend { padding-inline: 4px; color: var(--ink-500); font-size: .58rem; font-weight: 800; }
.manual-channel-choice .check-row { align-items: center; font-size: .68rem; }
.manual-channel-choice .check-row small { margin-top: 1px; color: var(--ink-500); font-size: .55rem; }
.milestone-broadcast-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.milestone-broadcast { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 11px; padding: 13px; border: 1px solid var(--cream-200); border-radius: 9px; background: var(--cream-50); }
.milestone-number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: var(--wine-700); background: var(--wine-100); font-size: .68rem; font-weight: 850; }
.milestone-broadcast strong { display: block; color: var(--ink-700); font-size: .76rem; }
.milestone-broadcast p { margin: 3px 0 0; color: var(--ink-500); font-size: .63rem; line-height: 1.45; }
.milestone-state { padding: 3px 7px; color: var(--ink-500); border-radius: 999px; background: var(--cream-200); font-size: .58rem; font-weight: 800; }
.milestone-broadcast.is-reached { border-color: color-mix(in srgb, var(--sage-600) 35%, var(--cream-200)); background: var(--sage-100); }
.milestone-broadcast.is-reached .milestone-number { color: #fff; background: var(--sage-600); }
.milestone-broadcast.is-reached .milestone-state { color: var(--sage-700); background: var(--white); }
.broadcast-consent-note { margin: 9px 0 0; color: var(--ink-500); font-size: .62rem; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-block: 18px 24px; }
.log-table-wrap { margin-top: 15px; }
.log-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--cream-200); color: var(--ink-700); font-size: .72rem; }
.log-section-heading span { color: var(--ink-500); font-size: .6rem; }
.delivery-log-note { margin: 7px 0 12px; font-size: .63rem; }
.delivery-log-table td strong, .delivery-log-table td small { display: block; }
.delivery-log-table td > small { margin-top: 3px; color: var(--ink-500); font-size: .56rem; }
.delivery-result-detail { max-width: 270px; overflow-wrap: anywhere; }
.compact-empty-state { padding-block: 22px 10px; }
.status-badge { padding: 3px 7px; border-radius: 999px; font-size: .62rem; font-weight: 800; text-transform: capitalize; }
.status-sent { color: var(--sage-700); background: var(--sage-100); }
.status-failed { color: var(--danger-700); background: var(--danger-100); }
.status-pending { color: var(--gold-600); background: var(--gold-100); }
.status-skipped { color: var(--ink-500); background: var(--cream-200); }
.message-examples { margin-top: 16px; border: 1px solid var(--cream-200); border-radius: 10px; background: var(--cream-50); }
.message-examples > summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 14px; color: var(--wine-700); list-style: none; font-size: .73rem; font-weight: 800; cursor: pointer; }
.message-examples > summary::-webkit-details-marker { display: none; }
.message-example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 14px 14px; border-top: 1px solid var(--cream-200); }
.message-example-card { min-width: 0; padding-top: 14px; }
.message-example-heading .eyebrow { margin-bottom: 3px; font-size: .59rem; }
.message-example-heading h3 { margin-bottom: 10px; font-family: var(--serif); font-size: 1rem; }
.email-example { overflow: hidden; border: 1px solid var(--cream-200); border-radius: 8px; background: var(--white); }
.email-example > p { display: grid; gap: 2px; margin: 0; padding: 9px 11px; border-bottom: 1px solid var(--cream-200); }
.email-example > p span { color: var(--ink-500); font-size: .54rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.email-example > p strong { overflow: hidden; color: var(--ink-700); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.message-copy { padding: 11px; color: var(--ink-700); font-size: .65rem; line-height: 1.45; white-space: pre-line; }
.sms-example { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 7px; margin-top: 9px; }
.sms-example > span { color: var(--ink-500); font-size: .55rem; font-weight: 800; text-transform: uppercase; }
.sms-example p { margin: 0; padding: 9px 10px; color: var(--ink-700); border-radius: 10px 10px 10px 3px; background: var(--sage-100); font-size: .62rem; line-height: 1.4; }

.audit-shell { max-width: 1360px; display: grid; gap: 14px; }
.audit-view-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.audit-view-tabs a { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; color: var(--ink-700); border: 1px solid var(--cream-200); border-radius: 10px; background: var(--white); text-decoration: none; box-shadow: var(--shadow-sm); }
.audit-view-tabs a span, .audit-view-tabs a strong, .audit-view-tabs a small { display: block; min-width: 0; }
.audit-view-tabs a strong { font-size: .75rem; }
.audit-view-tabs a small { margin-top: 2px; overflow: hidden; color: var(--ink-500); font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.audit-view-tabs a b { min-width: 30px; padding: 4px 7px; color: var(--ink-500); border-radius: 999px; background: var(--cream-100); font-size: .62rem; text-align: center; }
.audit-view-tabs a[aria-current="page"] { color: var(--wine-700); border-color: color-mix(in srgb, var(--wine-700) 35%, var(--cream-200)); background: var(--wine-100); }
.audit-view-tabs a[aria-current="page"] small, .audit-view-tabs a[aria-current="page"] b { color: var(--wine-700); }
.audit-card { padding: 18px 20px; }
.audit-column-filters { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); align-items: end; gap: 8px; margin-top: 14px; padding: 11px; border: 1px solid var(--cream-200); border-radius: 9px; background: var(--cream-50); }
.audit-column-filters label { min-width: 0; display: grid; gap: 4px; color: var(--ink-700); font-size: .6rem; font-weight: 800; }
.audit-column-filters select, .audit-column-filters input { width: 100%; min-height: 36px; padding: 6px 8px; color: var(--ink-900); border: 1px solid var(--cream-200); border-radius: 7px; background: var(--white); font-size: .67rem; }
.audit-search-filter { grid-column: span 2; }
.audit-filter-actions { display: flex; align-items: center; gap: 7px; }
.audit-note { margin: 11px 0 0; font-size: .64rem; }
.audit-table-wrap { margin-top: 13px; overflow-x: auto; }
.audit-table { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: .68rem; }
.audit-table th, .audit-table td { padding: 9px 8px; border-bottom: 1px solid var(--cream-200); text-align: left; vertical-align: top; }
.audit-table th { color: var(--ink-500); font-size: .57rem; letter-spacing: .07em; text-transform: uppercase; }
.audit-table td:first-child { width: 130px; color: var(--ink-500); white-space: nowrap; }
.audit-table td small { display: block; margin-top: 3px; color: var(--ink-500); font-size: .57rem; line-height: 1.35; }
.audit-project-name { color: var(--wine-700); }
.audit-category, .channel-badge, .trace-result { width: fit-content; display: inline-flex; padding: 3px 6px; border-radius: 999px; font-size: .54rem; font-weight: 850; white-space: nowrap; }
.category-learning { color: var(--sage-700); background: var(--sage-100); }
.category-people { color: var(--wine-700); background: var(--wine-100); }
.category-notifications { color: var(--gold-700); background: var(--gold-100); }
.category-security { color: var(--danger-700); background: var(--danger-100); }
.category-project { color: var(--ink-700); background: var(--cream-100); }
.audit-item-hebrew { width: fit-content; display: block; color: var(--ink-900); font-family: var(--serif); font-size: .78rem; }
.audit-table td .audit-item-english { margin-top: 3px; font-size: .58rem; }
.audit-details summary { color: var(--wine-700); font-size: .64rem; font-weight: 750; cursor: pointer; }
.audit-details code { display: block; max-width: 240px; margin-top: 5px; padding: 7px; overflow-wrap: anywhere; color: var(--ink-700); border-radius: 5px; background: var(--cream-100); font-size: .56rem; white-space: normal; }
.trace-explanation { display: flex; align-items: flex-start; gap: 9px; margin-top: 2px; padding: 9px 11px; color: var(--ink-600); border-left: 3px solid var(--sage-600); border-radius: 0 7px 7px 0; background: var(--sage-100); font-size: .61rem; }
.trace-explanation strong { flex: 0 0 auto; color: var(--ink-800); }
.trace-explanation b { color: var(--ink-800); }
.message-trace-table { min-width: 1220px; }
.trace-address { overflow-wrap: anywhere; }
.channel-email { color: var(--wine-700); background: var(--wine-100); }
.channel-sms { color: var(--gold-700); background: var(--gold-100); }
.result-delivered { color: var(--sage-700); background: var(--sage-100); }
.result-accepted, .result-in_progress { color: var(--gold-700); background: var(--gold-100); }
.result-failed { color: var(--danger-700); background: var(--danger-100); }
.trace-provider-id { display: block; max-width: 220px; overflow-wrap: anywhere; color: var(--ink-700); font-size: .56rem; }
.trace-error { color: var(--danger-700) !important; }

html[data-theme="dark"] .button-primary { color: #061619; }
html[data-theme="dark"] .button-primary:hover:not(:disabled) { color: #061619; background: #69cbc7; }
html[data-theme="dark"] .button-danger { color: #211318; }
html[data-theme="dark"] .brand { color: var(--ink-900); }
html[data-theme="dark"] .button-light { color: var(--ink-900); border-color: var(--cream-200); background: #21343a; }
html[data-theme="dark"] .button-light:hover:not(:disabled) { border-color: var(--wine-800); background: #294047; }
html[data-theme="dark"] .button-outline { border-color: #486068; }
html[data-theme="dark"] .selection-note { color: #ead29c; border-color: #5a482c; background: #2c261b; }
html[data-theme="dark"] .flash-success { color: #b8e5ca; border-color: #365d47; background: #1d3025; }
html[data-theme="dark"] .flash-error { color: #ffc2c8; border-color: #70404a; background: #392126; }
html[data-theme="dark"] .chapter-choice.is-taken { color: var(--ink-500); border-color: #514953; background: #29252b; }
html[data-theme="dark"] .chapter-choice.is-mine { color: var(--sage-700); border-color: #3b6250; background: var(--sage-100); }
html[data-theme="dark"] .chapter-status.is-complete { background: var(--sage-100); }
html[data-theme="dark"] .delivery-status.is-ready { border-color: #355b47; background: #1e3027; }
html[data-theme="dark"] .stack-form input:not([type="checkbox"]),
html[data-theme="dark"] .stack-form select,
html[data-theme="dark"] .copy-row input { border-color: #40575e; }
html[data-theme="dark"] .auth-card { border-color: rgb(255 255 255 / 14%); background: var(--cream-100); }
html[data-theme="dark"] .service-notice { color: #f6d891; border-color: #5a482c; background: #2c261b; }
html[data-theme="dark"] .auth-theme-toggle { color: #f6d891; border-color: rgb(246 216 145 / 24%); background: rgb(0 0 0 / 14%); }
html[data-theme="dark"] .hebrew-keyboard::backdrop { background: rgb(0 0 0 / 72%); }
html[data-theme="dark"] .photo-crop-dialog::backdrop { background: rgb(0 0 0 / 76%); }
html[data-theme="dark"] .progress-panel,
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .project-overview,
html[data-theme="dark"] .shared-assignment-card,
html[data-theme="dark"] .tractate-card { border-color: #3a5057; }
html[data-theme="dark"] .progress-metrics,
html[data-theme="dark"] .claim-group-card,
html[data-theme="dark"] .project-card-progress,
html[data-theme="dark"] .assignment-detail-panel { background: #0d191d; }
html[data-theme="dark"] input::placeholder { color: #82949a; opacity: 1; }
html[data-theme="dark"] .progress-claimed,
html[data-theme="dark"] .dot-claimed { background: #bda47e; }
html[data-theme="dark"] .generated-link-card p { color: #24443b; }
html[data-theme="dark"] .generated-link-card .eyebrow { color: #19392f; }

.auth-page { min-height: 100vh; color: #fff; background: var(--wine-950); }
.auth-page .site-footer { display: none; }
.auth-backdrop { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.auth-backdrop::before { content: ""; position: absolute; width: 620px; height: 620px; left: -300px; bottom: -310px; border: 1px solid rgb(209 168 92 / 14%); border-radius: 50%; box-shadow: 0 0 0 80px rgb(209 168 92 / 3%), 0 0 0 160px rgb(209 168 92 / 2%); }
.auth-backdrop span { position: absolute; right: -15px; bottom: -105px; color: rgb(255 255 255 / 2.6%); font-family: var(--serif); font-size: 17rem; direction: rtl; }
.auth-shell { position: relative; z-index: 1; width: 100%; min-height: 100vh; display: grid; grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr); align-items: center; gap: clamp(50px, 8vw, 110px); margin: auto; padding: 54px clamp(22px, 5vw, 84px); }
.auth-shell-compact { grid-template-columns: minmax(0, 1fr) 420px; }
.brand-light { color: #fff; }
.brand-light .brand-mark { color: var(--wine-900); background: var(--gold-400); }
.brand-light small { color: #bcabb4; }
.auth-intro .eyebrow { margin-top: 65px; color: var(--gold-400); }
.auth-intro h1 { max-width: 600px; margin-bottom: 20px; font-size: clamp(2.55rem, 5vw, 4.25rem); }
.auth-intro > p:not(.eyebrow) { max-width: 560px; color: #cfc0c7; font-size: .97rem; }
.feature-list { display: grid; gap: 16px; max-width: 500px; margin: 35px 0 0; padding: 0; list-style: none; color: #ddcfd6; font-size: .81rem; }
.feature-list li { display: flex; align-items: center; gap: 13px; }
.feature-list span { color: var(--gold-400); font-family: var(--serif); font-size: .88rem; }
.auth-card { color: var(--ink-900); border: 1px solid rgb(255 255 255 / 30%); border-radius: var(--radius-lg); background: var(--cream-50); box-shadow: 0 35px 80px rgb(0 0 0 / 28%); }
.auth-shell .auth-card { width: 100%; max-width: 650px; justify-self: end; }
.setup-card { padding: 38px 40px; }
.login-card { padding: 42px; }
.auth-card-heading { margin-bottom: 24px; }
.auth-card-heading h2 { margin-bottom: 8px; font-size: 2rem; }
.auth-card-heading p:not(.eyebrow) { margin-bottom: 0; color: var(--ink-500); font-size: .79rem; }
.auth-card .flash-wrap { width: 100%; margin: 0 0 18px; }

.error-page { min-height: 100vh; }
.error-shell { width: min(560px, calc(100% - 40px)); min-height: calc(100vh - 150px); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: auto; padding: 50px 0; text-align: center; }
.error-mark { color: var(--cream-200); font-family: var(--serif); font-size: 7rem; line-height: 1; }
.error-shell h1 { margin-bottom: 12px; font-size: 2.5rem; }
.error-shell > p:not(.eyebrow) { margin-bottom: 24px; color: var(--ink-500); }
.site-footer { padding: 18px 0; color: var(--ink-500); border-top: 1px solid var(--cream-200); background: var(--cream-100); font-size: .65rem; }
.footer-inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.footer-inner strong { color: var(--ink-700); }
.footer-inner a { color: var(--ink-700); font-weight: 750; text-decoration: none; }
.footer-inner a:hover { color: var(--wine-700); text-decoration: underline; }
.app-version { color: var(--ink-500); font-size: .58rem; font-weight: 750; }

.legal-shell { width: min(900px, 100%); margin: 36px auto 70px; padding-inline: clamp(14px, 2.4vw, 24px); }
.legal-card { padding: clamp(24px, 4vw, 44px); }
.legal-card h2 { margin: 30px 0 10px; font-size: 1.25rem; }
.legal-card h2:first-of-type { margin-top: 18px; }
.legal-card p, .legal-card li { color: var(--ink-700); }
.legal-card a { color: var(--wine-700); font-weight: 750; }
.legal-card ul, .legal-card ol { display: grid; gap: 9px; padding-left: 24px; }
.legal-updated { margin-bottom: 24px; color: var(--ink-500) !important; font-size: .76rem; font-weight: 750; }
.sms-consent-example { margin: 24px 0 34px; padding: 18px; border: 1px solid var(--cream-200); border-radius: var(--radius-md); background: var(--cream-50); }
.sms-consent-example > small { display: block; margin-top: 10px; color: var(--ink-500); font-size: .7rem; }

@media (max-width: 900px) {
  .header-inner { grid-template-columns: auto minmax(130px, 210px) 1fr; gap: 10px; }
  .main-nav { gap: 2px; overflow-x: auto; }
  .main-nav > a, .nav-button { flex: 0 0 auto; padding-inline: 7px; }
  .project-card-grid { grid-template-columns: 1fr; }
  .batch-claim-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .theme-label { display: none; }
  .progress-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-metrics article:nth-child(2) { border-right: 0; }
  .progress-metrics article:nth-child(-n + 2) { border-bottom: 1px solid var(--cream-200); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-aside { grid-template-columns: minmax(250px, .7fr) minmax(0, 1.3fr); }
  .people-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .shared-assignment-row { grid-template-columns: 1fr 1fr; gap: 12px 18px; }
  .shared-assignment-card .assignment-toggle { grid-column: 1 / -1; justify-self: start; }
  .tractate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
  .owner-tools-grid { grid-template-columns: 1fr; }
  .management-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .audit-column-filters { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .auth-shell, .auth-shell-compact { grid-template-columns: 1fr; gap: 42px; padding-block: 38px 60px; }
  .auth-intro .eyebrow { margin-top: 45px; }
  .auth-intro h1 { max-width: 720px; }
  .auth-card { width: min(620px, 100%); }
  .generated-link-card { grid-template-columns: 1fr; gap: 18px; }
  .catalog-name-row { grid-template-columns: 115px 1fr 1fr; }
  .catalog-name-row .button { grid-column: 2 / -1; justify-self: end; }
  .message-example-grid { grid-template-columns: 1fr; }
  .milestone-broadcast-grid { grid-template-columns: 1fr; }
  .manual-reminder-grid { grid-template-columns: 1fr 1fr; }
  .manual-reminder-grid > .button { grid-column: 1 / -1; justify-self: start; }
  .owner-participant-row { grid-template-columns: 1fr; gap: 10px; }
  .directory-project-add-grid { grid-template-columns: 1fr; }
  .directory-project-add-grid .button { width: 100%; }
  .directory-profile-grid { grid-template-columns: 1fr; }
  .directory-profile-footer { align-items: stretch; flex-direction: column; }
  .directory-profile-footer .button { width: 100%; }
}

@media (max-width: 640px) {
  .shell, .narrow-shell { width: 100%; padding-inline: 12px; }
  .service-notice-inner { align-items: flex-start; justify-content: flex-start; text-align: left; }
  .auth-page .service-notice-inner { padding-right: 58px; }
  .site-header { position: relative; }
  .management-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-nav a small { white-space: normal; }
  .admin-section-nav { position: static; width: calc(100% + 24px); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: -12px; padding-inline: 12px; border-inline: 0; border-radius: 0; box-shadow: none; }
  .header-dedication { min-height: 32px; font-size: .88rem; }
  .header-inner { min-height: 0; grid-template-columns: 1fr; gap: 7px; padding-block: 8px; }
  .project-switcher { width: 100%; }
  .main-nav { width: calc(100% + 24px); justify-content: flex-start; gap: 6px; margin-inline: -12px; padding: 2px 12px 5px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: inline proximity; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav > a, .main-nav .nav-button, .main-nav .theme-toggle { min-height: 40px; display: inline-flex; align-items: center; flex: 0 0 auto; padding-inline: 11px; border: 1px solid var(--cream-200); border-radius: 8px; background: var(--cream-100); scroll-snap-align: start; }
  .main-nav form { flex: 0 0 auto; }
  .brand small { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .nav-divider { display: none; }
  .project-hero-grid { min-height: 280px; grid-template-columns: 1fr; align-content: center; gap: 25px; padding-block: 40px 50px; }
  .project-hero h1 { font-size: 2.5rem; }
  .hero-actions .button { width: 100%; }
  .dashboard-shell { padding-block: 14px 40px; }
  .project-overview { padding: 19px 16px 16px; }
  .project-overview-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .project-overview-identity { align-items: flex-start; }
  .project-overview-photo { width: 76px; height: 90px; border-radius: 12px; }
  .project-overview-heading .button { width: 100%; }
  .project-card-progress { grid-template-columns: 1fr; }
  .project-card-progress span { grid-template-columns: auto 1fr; align-items: baseline; border-right: 0; border-bottom: 1px solid var(--cream-200); }
  .project-card-progress span:last-child { border-bottom: 0; }
  .progress-metrics { grid-template-columns: 1fr 1fr; }
  .progress-metrics article { padding: 12px; }
  .progress-metrics article > strong { font-size: 1.25rem; }
  .progress-panel, .content-card, .settings-card { padding: 18px 15px; }
  .section-heading-row, .card-heading { gap: 14px; }
  .section-heading-row { display: block; }
  .progress-totals { margin-top: 13px; }
  .progress-big strong { font-size: 1.65rem; }
  .progress-legend { display: grid; gap: 8px; }
  .dashboard-aside { grid-template-columns: 1fr; }
  .people-list { grid-template-columns: 1fr; }
  .shared-assignment-row { grid-template-columns: 1fr; gap: 10px; }
  .shared-assignment-card .assignment-toggle { grid-column: 1; }
  .shared-assignment-card .assignment-detail-heading { align-items: flex-start; flex-direction: column; }
  .page-banner-inner { min-height: 0; align-items: flex-start; flex-direction: column; justify-content: center; gap: 14px; padding-block: 18px; }
  .page-banner-inner > .button { width: 100%; }
  .page-banner-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .page-banner-actions .button { width: 100%; }
  .batch-claim-toolbar { position: sticky; top: 8px; grid-template-columns: 1fr; align-items: stretch; }
  .batch-claim-toolbar > .count-badge { justify-self: start; }
  .batch-assign-to { width: 100%; }
  .seder-part-heading { align-items: stretch; flex-direction: column; }
  .batch-group-toggle { width: 100%; }
  .seder-heading-actions { grid-column: 2; justify-items: stretch; }
  .seder-heading { grid-template-columns: auto 1fr; }
  .seder-summary { grid-column: 2; }
  .tractate-grid { grid-template-columns: 1fr; }
  .tractate-card[open] { grid-column: span 1; }
  .field-pair { grid-template-columns: 1fr; }
  .directory-metrics { grid-template-columns: 1fr; }
  .directory-heading { align-items: flex-start; flex-direction: column; }
  .directory-search { width: 100%; }
  .project-delete-panel form { grid-template-columns: 1fr; }
  .project-delete-panel .button { width: 100%; }
  .project-card-actions .archive-project-form, .project-card-actions .archive-visibility-form, .pending-project-invitation-list article { align-items: stretch; flex-direction: column; }
  .pending-project-invitation-list .button { width: 100%; }
  .hebrew-date-fields { grid-template-columns: .72fr 1.28fr; }
  .hebrew-date-fields label:last-child { grid-column: 1 / -1; }
  .admin-assignment-bar, .schedule-grid { grid-template-columns: 1fr; }
  .schedule-section-heading { align-items: center; }
  .catalog-name-row { grid-template-columns: 1fr 1fr; align-items: end; }
  .catalog-source { grid-column: 1 / -1; }
  .catalog-name-row .button { grid-column: 1 / -1; width: 100%; }
  .auth-shell, .auth-shell-compact { width: 100%; padding: 32px 12px 48px; }
  .auth-intro h1 { font-size: 2.55rem; }
  .feature-list { display: none; }
  .setup-card, .login-card { padding: 28px 20px; border-radius: 17px; }
  .auth-card-heading h2 { font-size: 1.7rem; }
  .copy-row { display: grid; }
  .admin-user-card summary { grid-template-columns: auto 1fr auto; }
  .admin-user-card summary .details-chevron { display: none; }
  .delivery-status-grid { grid-template-columns: 1fr; }
  .owner-tool-stats { grid-template-columns: repeat(2, 1fr); }
  .recovery-steps li { grid-template-columns: 1fr; gap: 4px; }
  .manual-reminder-heading { flex-direction: column; }
  .manual-reminder-grid { grid-template-columns: 1fr; }
  .manual-reminder-grid > .button { grid-column: 1; width: 100%; }
  .manual-channel-choice { flex-direction: column; gap: 9px; }
  .memorial-label-row { align-items: flex-start; flex-direction: column; }
  .hebrew-keyboard-open { width: 100%; }
  .hebrew-keyboard { width: calc(100% - 16px); max-height: 92dvh; border-radius: 12px; }
  .hebrew-keyboard-panel { gap: 11px; padding: 13px; }
  .hebrew-keyboard-row { gap: 4px; }
  .hebrew-keyboard button[data-hebrew-key] { min-width: 30px; min-height: 42px; padding: 5px 3px; font-size: 1.05rem; }
  .hebrew-keyboard-quick button[data-hebrew-key] { min-width: 60px; }
  .hebrew-keyboard-actions .hebrew-space-key { min-width: 120px; }
  .photo-crop-dialog { width: calc(100% - 16px); border-radius: 12px; }
  .photo-crop-panel { padding: 13px; }
  .photo-crop-result { grid-template-columns: 48px minmax(0, 1fr); }
  .photo-crop-result img { width: 48px; height: 60px; }
  .photo-crop-result .button { grid-column: 1 / -1; width: 100%; }
  .photo-crop-actions { grid-template-columns: 1fr 1fr; }
  .photo-crop-actions span { display: none; }
  .photo-crop-actions .button { width: 100%; }
  .audit-view-tabs { grid-template-columns: 1fr; }
  .audit-column-filters { grid-template-columns: 1fr; align-items: stretch; }
  .audit-search-filter { grid-column: 1; }
  .audit-filter-actions { align-items: stretch; flex-direction: column; }
  .audit-filter-actions .button { width: 100%; }
  .trace-explanation { flex-direction: column; gap: 3px; }
  .message-trace-link-card { align-items: stretch; flex-direction: column; }
  .message-trace-link-card .button { width: 100%; }
  .audit-table-wrap { overflow: visible; }
  .audit-table { min-width: 0; border-collapse: separate; border-spacing: 0 10px; }
  .audit-table thead { display: none; }
  .audit-table tbody, .audit-table tr, .audit-table td { display: block; width: 100%; }
  .audit-table tr { overflow: hidden; border: 1px solid var(--cream-200); border-radius: 9px; background: var(--cream-50); }
  .audit-table td, .audit-table td:first-child { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--cream-200); white-space: normal; }
  .audit-table td:last-child { border-bottom: 0; }
  .audit-table td::before { content: attr(data-label); color: var(--ink-500); font-size: .58rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .audit-details code { max-width: 100%; }
}

@media (max-width: 420px) {
  .progress-metrics { grid-template-columns: 1fr; }
  .progress-metrics article { border-right: 0; border-bottom: 1px solid var(--cream-200); }
  .progress-metrics article:nth-child(2) { border-right: 0; }
  .progress-metrics article:last-child { border-bottom: 0; }
  .overview-deadline-hebrew { align-items: flex-end; flex-direction: column; gap: 5px; }
  .deadline-context { align-items: flex-end; flex-direction: column; gap: 1px; }
  .project-overview { padding-inline: 13px; }
  .assignment-chapter-grid { grid-template-columns: 1fr; }
  .reminder-row { grid-template-columns: 68px minmax(0, 1fr) 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
