/* Warm paper, in the shul's colors: parchment page, white work cards, sunk
   result wells, an ink ladder from the logo's brown lettering and one bronze
   accent from its scrollwork. Logical properties throughout so Hebrew mirrors. */

@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/poppins-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/poppins-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/poppins-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Rubik Hebrew'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/fonts/rubik-hebrew-400-normal.woff2) format('woff2'); unicode-range: U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }
@font-face { font-family: 'Rubik Hebrew'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/fonts/rubik-hebrew-500-normal.woff2) format('woff2'); unicode-range: U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }
@font-face { font-family: 'Rubik Hebrew'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/fonts/rubik-hebrew-600-normal.woff2) format('woff2'); unicode-range: U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F; }

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

:root {
  --page: #F3EEE2; --card: #FFFFFF; --sunk: #F9F6EF; --rail: #EAE3D2;
  --ink: #1F1A12; --ink2: #4D4535; --ink3: #6E6551; --ink4: #A39A86;
  --line: #E7E0D0; --line2: #D6CCB7;
  --clay: #8A5A1C; --clay-deep: #744A15; --clay-dark: #5B3A0F; --wash: #F6EDDB; --wash2: #EEDFC1;
  --ring: rgba(138, 90, 28, .16);
  --sage: #3F5C43; --sage-bg: #E9F0E6;
  --honey: #8A4210; --honey-bg: #FBE8D7;
  --rose: #8B3143; --rose-bg: #FAE6E9; --rose-mid: #C4667A;
  --peri: #454894; --peri-bg: #E9EAF7;
  --teal: #2A6157; --teal-bg: #E2F1EE;
  --r: 12px; --r2: 16px; --r3: 22px;
  --sh: 0 1px 2px rgba(31, 26, 18, .04), 0 4px 16px rgba(31, 26, 18, .05);
  --sh2: 0 2px 6px rgba(31, 26, 18, .07), 0 14px 36px rgba(31, 26, 18, .10);
  --fd: 'Poppins', 'Rubik Hebrew', -apple-system, system-ui, sans-serif;
  --fb: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --rail-w: 252px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:lang(he) { --fb: 'Rubik Hebrew', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; }

html, body { height: 100%; }
body {
  background: var(--page); color: var(--ink); font-family: var(--fb);
  font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--wash2); color: var(--ink); }
button, input, textarea { font: inherit; color: inherit; }
input, textarea { caret-color: var(--clay); }
button { background: none; border: none; cursor: pointer; }
a { color: var(--clay-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-radius: 6px; }
.ic { stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
[dir='rtl'] .flip { transform: scaleX(-1); }
.num { font-family: var(--fd); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.vhide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }

/* ---------------------------------------------------------------- shell */

.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--rail); border-inline-end: 1px solid var(--line2); padding: 18px 14px 14px;
}
.brand { display: block; padding: 4px 6px 18px; text-decoration: none; color: var(--ink); }
.brand img { display: block; width: 100%; height: auto; max-height: 76px; object-fit: contain; object-position: center; }
.brand .name { font-family: var(--fd); font-weight: 600; font-size: 16px; letter-spacing: -.01em; line-height: 1.3; }
.brand .name-he { display: block; font-size: 13.5px; color: var(--ink2); font-weight: 500; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; height: 40px; padding-inline: 11px; border-radius: 10px;
  color: var(--ink2); text-decoration: none; font-size: 14px; transition: background .15s var(--ease), color .15s var(--ease);
}
.nav a:hover { background: rgba(255, 255, 255, .55); color: var(--ink); }
.nav a[aria-current='page'] { background: var(--card); color: var(--clay-dark); font-weight: 500; box-shadow: 0 1px 2px rgba(31, 26, 18, .08); }
.nav a[aria-current='page'] .ic { color: var(--clay); }
.nav .soon { margin-inline-start: auto; font-size: 11.5px; color: var(--ink3); }
.nav .sep { height: 1px; background: var(--line2); margin: 10px 8px; }

.rail-foot { margin-top: auto; border-top: 1px solid var(--line2); padding-top: 12px; display: grid; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding-inline: 4px; }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { display: block; font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn {
  width: 36px; height: 36px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--ink2);
  transition: background .15s var(--ease);
}
.iconbtn:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }

.av {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-family: var(--fd); font-size: 12.5px; font-weight: 600; background: var(--wash); color: var(--clay-deep);
}
.av.t1 { background: var(--sage-bg); color: var(--sage); }
.av.t2 { background: var(--peri-bg); color: var(--peri); }
.av.t3 { background: var(--teal-bg); color: var(--teal); }
.av.t4 { background: var(--rose-bg); color: var(--rose); }

.topbar { display: none; }
.scrim { display: none; }

.main { min-width: 0; padding: 30px 40px 56px; }
.main-in { max-width: 1160px; margin-inline: auto; container: main / inline-size; }

/* ---------------------------------------------------------------- page head */

.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head .t { flex: 1; min-width: 260px; }
.head h1 { font-family: var(--fd); font-size: 25px; font-weight: 600; letter-spacing: -.022em; line-height: 1.25; }
.head p { color: var(--ink2); margin-top: 5px; max-width: 70ch; }
.head .meta { font-size: 12.5px; color: var(--ink3); }

.tabs { margin-bottom: 20px; }

/* ---------------------------------------------------------------- rule beside result */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.split.wide-rule { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--sh); display: flex; flex-direction: column; min-width: 0; }
.card > form { display: flex; flex-direction: column; }
.card > .hd, .card > form > .hd, .result > .hd { padding: 16px 22px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card > .hd, .card > form > .hd { border-bottom: 1px solid var(--line); }
.card > form + form > .hd { border-top: 1px solid var(--line); }
.hd h2 { font-family: var(--fd); font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.hd .aside { margin-inline-start: auto; font-size: 12.5px; color: var(--ink3); }
.card > .bd, .card > form > .bd { padding: 20px 22px; display: grid; gap: 18px; align-content: start; flex: 1; }
.card > .ft, .card > form > .ft {
  border-top: 1px solid var(--line); padding: 14px 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-radius: 0 0 var(--r2) var(--r2);
}
.card > form > .ft { border-radius: 0; }
.ft-sum { display: none; flex-basis: 100%; gap: 4px 14px; flex-wrap: wrap; align-items: baseline; font-size: 12.5px; padding-bottom: 4px; }
.ft-sum .c { color: var(--clay-dark); font-weight: 500; }
.ft-sum .w { color: var(--honey); }
.ft-sum a { margin-inline-start: auto; }
.card > .ft .meta, .card > form > .ft .meta { font-size: 12.5px; color: var(--ink3); margin-inline-end: auto; }

.result { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r2); display: flex; flex-direction: column; min-width: 0; container: result / inline-size; }
.result > .hd { border-bottom: 1px solid var(--line); }
.result > .bd { padding: 6px 0; flex: 1; }
.result > .ft { padding: 14px 22px 18px; display: grid; gap: 10px; }

.group-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
:lang(he) .group-label { letter-spacing: 0; text-transform: none; font-size: 13px; }

/* day rows in a result pane */
.rows { list-style: none; }
.rows li {
  display: grid; grid-template-columns: 9.5em minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 11px 22px; border-bottom: 1px solid var(--line); transition: background .35s var(--ease);
}
.rows li:last-child { border-bottom: none; }
.rows .day b { display: block; font-weight: 500; font-size: 14px; }
.rows .day span { display: block; font-size: 12.5px; color: var(--ink3); }
.rows .day .now { display: inline; color: var(--ink); font-weight: 600; }
.rows .what { font-size: 13.5px; color: var(--ink2); min-width: 0; }
.rows .what.bad { color: var(--rose); }
.rows .what.muted { color: var(--ink3); }
.rows li.changed { background: var(--wash); }
.rows li.changed .what::after { content: none; }
.rows .chg { display: block; font-size: 12px; color: var(--clay-dark); margin-top: 2px; }
.num .ap { font-size: .8em; color: var(--ink3); margin-inline-start: .18em; font-weight: 400; letter-spacing: .02em; }

/* ---------------------------------------------------------------- fields */

.field { display: grid; gap: 5px; min-width: 0; }
.lbl { font-size: 12.5px; color: var(--ink2); font-weight: 500; }
.hint { font-size: 12.5px; color: var(--ink3); line-height: 1.45; }
.hint.bad, .err { color: var(--rose); }
.err { font-size: 12.5px; }
.inp {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--card); font-size: 14.5px; transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}
textarea.inp { height: auto; min-height: 92px; padding: 9px 12px; line-height: 1.5; resize: vertical; }
.inp::placeholder { color: var(--ink3); }
.inp:hover { border-color: #C9BEA6; }
.inp:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px var(--ring); }
.inp[aria-invalid='true'] { border-color: var(--rose-mid); }
.inp.time { width: 100%; min-width: 0; padding: 0 8px; text-align: center; font-family: var(--fd); font-variant-numeric: tabular-nums; }
.inp.edited { background: var(--wash); border-color: var(--wash2); }
.inp.edited:focus { border-color: var(--clay); }
.inp.ltr { direction: ltr; text-align: start; }
[dir='rtl'] .inp.ltr { text-align: right; }
.derived { background: var(--sunk); display: flex; align-items: center; color: var(--ink2); }
.times { display: grid; grid-template-columns: repeat(3, minmax(0, 8.4em)); gap: 12px; }
.times .field { min-width: 0; }
.pw { position: relative; }
.pw .inp { padding-inline-end: 44px; }
.pw .iconbtn { position: absolute; inset-inline-end: 3px; top: 2px; color: var(--ink3); }
.pw .iconbtn:hover { background: var(--sunk); }
.stack { display: grid; gap: 14px; }

/* ---------------------------------------------------------------- buttons, toggles */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line2); background: var(--card); font-size: 13.5px; color: var(--ink); white-space: nowrap;
  transition: background .14s var(--ease), border-color .14s var(--ease), transform .1s var(--ease), filter .14s var(--ease);
}
.btn:hover { background: var(--sunk); }
.btn:active { transform: scale(.985); }
.btn.pri { background: var(--clay); border-color: var(--clay); color: #fff; font-weight: 500; }
.btn.pri:hover { background: var(--clay-deep); border-color: var(--clay-deep); }
.btn.gh { border-color: transparent; background: transparent; color: var(--ink2); }
.btn.gh:hover { background: var(--sunk); color: var(--ink); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.dgr { color: var(--rose); border-color: var(--rose-bg); }
.btn.dgr:hover { background: var(--rose-bg); }
.btn.block { width: 100%; height: 42px; font-size: 14px; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.busy { cursor: progress; }

.tog { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tog button {
  height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card);
  font-size: 13.5px; color: var(--ink2); display: inline-flex; align-items: center; gap: 8px;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.tog button:hover { border-color: #C9BEA6; }
.tog button[aria-pressed='true'], .tog button[aria-checked='true'] { background: var(--wash); border-color: var(--wash2); color: var(--clay-dark); font-weight: 500; }
.tog.big button { height: 42px; padding: 0 20px; font-size: 14px; font-weight: 600; border-radius: 11px; }
.tog.big button[aria-checked='true'] { background: var(--clay); border-color: var(--clay); color: #fff; box-shadow: 0 2px 8px rgba(31, 26, 18, .12); }
.tog.big button.off[aria-checked='true'] { background: var(--ink2); border-color: var(--ink2); }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); cursor: pointer; }
.check .box {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line2); background: var(--card); display: grid; place-items: center;
  color: #fff; transition: background .15s var(--ease), border-color .15s var(--ease);
}
.check[aria-checked='true'] .box { background: var(--clay); border-color: var(--clay); }
.check[aria-checked='false'] .box .ic { opacity: 0; }

.seg { display: inline-flex; background: var(--sunk); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg a, .seg button {
  padding: 0 14px; height: 32px; border-radius: 8px; font-size: 13.5px; color: var(--ink2); text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px; transition: background .15s var(--ease);
}
.seg a:hover, .seg button:hover { color: var(--ink); }
/* When a grid stretches the track, the options share it instead of leaving an empty half. */
.seg a, .seg button { flex: 1 1 auto; justify-content: center; }
.seg [aria-current='page'], .seg [aria-checked='true'] { background: var(--card); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(31, 26, 18, .08); }

.abspanel { background: var(--sunk); border: 1px solid var(--line); border-radius: 13px; padding: 15px 16px; display: grid; gap: 12px; }

/* ---------------------------------------------------------------- pills, notes */

.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 11px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.p-good { background: var(--sage-bg); color: var(--sage); }
.p-warn { background: var(--honey-bg); color: var(--honey); }
.p-bad { background: var(--rose-bg); color: var(--rose); }
.p-info { background: var(--peri-bg); color: var(--peri); }
.p-off { background: var(--card); color: var(--ink3); border: 1px solid var(--line); }

.note {
  display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 13px; font-size: 13px; color: var(--ink2); line-height: 1.5;
}
.note .ic { margin-top: 1px; }
.note.good { background: var(--sage-bg); border-color: transparent; color: var(--sage); }
.note.warn { background: var(--honey-bg); border-color: transparent; color: var(--honey); }
.note.bad { background: var(--rose-bg); border-color: transparent; color: var(--rose); }
.note.accent { background: var(--wash); border-color: var(--wash2); color: var(--clay-dark); }

/* ---------------------------------------------------------------- home table */

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th {
  font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); font-weight: 600;
  text-align: start; padding: 12px 22px; border-bottom: 1px solid var(--line);
}
:lang(he) .t th { letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.t td { padding: 15px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: none; }
.t tbody tr { cursor: pointer; transition: background .15s var(--ease); }
.t tbody tr:hover td { background: var(--sunk); }
.t .sec a { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 500; }
.t .sec .ic { color: var(--ink3); }
.t .set { color: var(--ink2); }
.t .next { background: var(--sunk); }
.t tbody tr:hover .next { background: #F3EFE5; }
.t .muted { color: var(--ink3); }
.t .chev { width: 40px; color: var(--ink4); }
.home-card { overflow: hidden; }

/* ---------------------------------------------------------------- people */

.plist { display: grid; gap: 8px; }
.pr { background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.pr:hover { border-color: var(--line2); box-shadow: var(--sh); }
.pr.open { border-color: var(--clay); box-shadow: 0 2px 8px var(--ring); }
.pr .top { display: flex; align-items: center; gap: 12px; padding: 11px 14px; width: 100%; text-align: start; border-radius: 14px; }
.pr .top .who { min-width: 0; flex: 1; }
.pr .top b { display: block; font-weight: 500; }
.pr .top span.mail { display: block; font-size: 12.5px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; }
[dir='rtl'] .pr .top span.mail { text-align: right; }
.pr .chev { color: var(--ink4); transition: transform .18s var(--ease); }
.pr.open .chev { transform: rotate(90deg); }
[dir='rtl'] .pr.open .chev { transform: scaleX(-1) rotate(90deg); }
.pr .exp { border-top: 1px solid var(--line); padding: 14px; background: var(--sunk); border-radius: 0 0 13px 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pr .exp .hint { flex-basis: 100%; }
.linkbox {
  display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line2); border-radius: 10px;
  padding: 6px 6px 6px 12px; direction: ltr; min-width: 0;
}
.linkbox code { flex: 1; min-width: 0; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- previews */

.preview-stage { padding: 20px 22px 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.preview-cap { font-size: 12.5px; color: var(--ink3); margin-bottom: 8px; }
.mini-rail { width: 240px; max-width: 100%; background: var(--rail); border: 1px solid var(--line2); border-radius: 12px; padding: 14px; }
.mini-rail .brand { padding: 0 2px 4px; pointer-events: none; }
.mini-signin { background: var(--page); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; justify-items: center; gap: 12px; }
.mini-signin .logo { max-width: 260px; width: 100%; }
.mini-signin .logo img { width: 100%; height: auto; display: block; }
.mini-signin .nm { font-family: var(--fd); font-weight: 600; font-size: 17px; text-align: center; }
.mini-signin .nmhe { font-size: 14px; color: var(--ink2); text-align: center; }
.mini-signin .addr { font-size: 12.5px; color: var(--ink3); text-align: center; }
.mini-card { width: 100%; max-width: 250px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; font-size: 10.5px; color: var(--ink2); }
.mini-card .mt { font-family: var(--fd); font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.mini-card .mi { height: 16px; border: 1px solid var(--line2); border-radius: 5px; margin-bottom: 3px; }
.mini-card .mb { margin-top: 4px; height: 20px; border-radius: 6px; background: var(--clay); color: #fff; display: grid; place-items: center; font-weight: 500; }
.mini-dir { display: flex; gap: 10px; align-items: stretch; background: var(--page); border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 11px; color: var(--ink2); }
.mini-dir .r { width: 30%; background: var(--rail); border-radius: 8px; padding: 8px; display: grid; gap: 2px; align-content: start; }
.mini-dir .r span { padding: 4px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-dir .r span.on { background: var(--card); color: var(--clay-dark); font-weight: 500; box-shadow: 0 1px 2px rgba(31, 26, 18, .08); }
.mini-dir .m { flex: 1; min-width: 0; display: grid; gap: 8px; align-content: start; padding: 4px 2px; }
.mini-dir .m b { font-family: var(--fd); font-size: 13px; font-weight: 600; color: var(--ink); }
.mini-dir .m .pane { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mini-dir .m .pane span { min-height: 64px; border-radius: 7px; background: var(--card); border: 1px solid var(--line); padding: 6px 7px; font-weight: 500; color: var(--ink); }
.mini-dir .m .pane span + span { background: var(--sunk); }
.logo-drop {
  display: grid; place-items: center; min-height: 110px; padding: 14px; border: 1px dashed var(--line2); border-radius: 12px;
  background: var(--sunk); transition: border-color .15s var(--ease), background .15s var(--ease);
}
.logo-drop.over { border-color: var(--clay); background: var(--wash); }
.logo-drop img { max-width: 100%; max-height: 110px; display: block; }
.logo-drop p { color: var(--ink3); font-size: 13px; text-align: center; }

#add-slot:empty { display: none; }

/* ---------------------------------------------------------------- connectors */

.cx .top .via { display: block; font-size: 12.5px; color: var(--ink3); }
.cn-ic {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--sunk); border: 1px solid var(--line); color: var(--ink2);
}
.pr .exp.ed { display: block; padding: 18px 16px 16px; }
.pr .exp[hidden] { display: none; }
.ed-form { display: grid; gap: 16px; }
.ed-ft { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.ed-ft .meta { font-size: 12.5px; color: var(--ink3); margin-inline-end: auto; }
.ed-ft .btn.pri { margin-inline-start: auto; }
.cx-status { display: grid; gap: 10px; }
.cx-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cx-actions:empty { display: none; }
.cx-cap { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.cx-cap .preview-cap { margin: 0; }
.seg.sm { padding: 2px; border-radius: 9px; }
.seg.sm button { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; white-space: nowrap; flex: none; }
.cx-cap .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.mailview { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mv-hd { padding: 11px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 3px; font-size: 13px; }
.mv-hd div { display: flex; gap: 10px; min-width: 0; }
.mv-hd dt { color: var(--ink3); width: 4.6em; flex: none; }
.mv-hd dd { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mailview iframe { display: block; width: 100%; height: 480px; border: 0; background: var(--page); }
.sent-list { list-style: none; display: grid; }
.sent-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 3px 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.sent-list li:first-child { padding-top: 0; }
.sent-list li:last-child { border-bottom: none; padding-bottom: 0; }
.sent-list .what { min-width: 0; }
.sent-list .what b { display: block; font-weight: 500; font-size: 13.5px; }
.sent-list .to { display: block; font-size: 12.5px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
[dir='rtl'] .sent-list .to { text-align: right; }
.sent-list .when { font-size: 12.5px; color: var(--ink3); white-space: nowrap; }
.sent-list .why { grid-column: 1 / -1; font-size: 12.5px; color: var(--rose); }

/* ---------------------------------------------------------------- empty / not built */

.bullets { list-style: none; display: grid; gap: 10px; }
.bullets li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink2); }
.bullets li .ic { color: var(--ink3); margin-top: 2px; }
.bullets .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line2); flex: none; margin: 8px 5px 0; }
.result .bullets { padding: 16px 22px; }

/* ---------------------------------------------------------------- sign in */

.gate { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; position: relative; }
.gate-in { width: 100%; max-width: 420px; display: grid; gap: 22px; }
.gate .logo { display: block; width: min(380px, 100%); margin-inline: auto; }
.gate .logo img { width: 100%; height: auto; display: block; }
.gate .shulname { text-align: center; font-family: var(--fd); font-weight: 600; font-size: 20px; letter-spacing: -.015em; }
.gate .card .bd { gap: 16px; padding: 24px; }
.gate h1 { font-family: var(--fd); font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.gate .sub { color: var(--ink2); margin-top: -8px; }
.gate .lang { position: absolute; top: 18px; inset-inline-end: 18px; }
.gate .back { text-align: center; font-size: 13.5px; }

/* ---------------------------------------------------------------- modal, toast */

.mback {
  position: fixed; inset: 0; background: rgba(31, 26, 18, .34); display: grid; place-items: center; padding: 24px; z-index: 60;
  animation: fade .16s var(--ease);
}
.modal { background: var(--card); border-radius: 18px; box-shadow: var(--sh2); width: min(460px, 100%); animation: rise .2s var(--ease); }
.modal .mh { padding: 20px 22px 6px; }
.modal .mh h3 { font-family: var(--fd); font-size: 17px; font-weight: 600; }
.modal .mh p { font-size: 13.5px; color: var(--ink2); margin-top: 4px; }
.modal .mf { padding: 16px 22px 20px; display: flex; gap: 9px; align-items: center; }
.modal .mf .grow { flex: 1; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: 11px; font-size: 13.5px; box-shadow: var(--sh2); z-index: 80; max-width: calc(100vw - 32px);
  animation: toastIn .22s var(--ease);
}
.toast.bad { background: var(--rose); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }

.skel { background: linear-gradient(90deg, var(--line) 0%, #F1ECDF 50%, var(--line) 100%); background-size: 200% 100%; border-radius: 6px; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-rows li .skel { height: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- narrower screens */

@container main (max-width: 640px) {
  .split, .split.wide-rule { grid-template-columns: minmax(0, 1fr); }
  .ft-sum:not(:empty) { display: flex; }
}
@container result (max-width: 470px) {
  .sent-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .sent-list .when { grid-row: 2; grid-column: 1; }
  .sent-list .pill { grid-row: 1; grid-column: 2; }
  .rows li { padding-inline: 16px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'day pill' 'what what'; row-gap: 4px; }
  .rows li .day { grid-area: day; }
  .rows li .what { grid-area: what; }
  .rows li .pill { grid-area: pill; }
  .rows .day b, .rows .day span { display: inline; }
  .rows .day > span::before { content: ' · '; color: var(--ink4); }
}
@media (min-width: 901px) and (max-width: 1280px) {
  :root { --rail-w: 216px; }
  .main { padding: 26px 28px 48px; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; }
  .rail {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: min(300px, 86vw); z-index: 50; height: 100%;
    transform: translateX(-102%); transition: transform .22s var(--ease); box-shadow: var(--sh2);
  }
  [dir='rtl'] .rail { transform: translateX(102%); }
  .menu-open .rail { transform: none; }
  .menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(31, 26, 18, .3); z-index: 40; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; height: 58px; padding: 0 12px;
    background: var(--rail); border-bottom: 1px solid var(--line2);
  }
  .topbar .brand { padding: 0; flex: 1; min-width: 0; display: flex; justify-content: center; }
  .topbar .brand img { height: 40px; width: auto; max-width: 100%; }
  .topbar .brand .name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .spacer { width: 36px; }
  .main { padding: 22px 16px 48px; }
  .head h1 { font-size: 22px; }
  .card > .hd, .result > .hd, .card > .bd, .card > .ft { padding-inline: 16px; }
  .t th, .t td { padding-inline: 14px; }
  .t .chev { display: none; }
  .tabs .seg { width: 100%; }
  .tabs .seg a { flex: 1 1 auto; justify-content: center; padding: 0 8px; white-space: nowrap; }
}

@media (max-width: 560px) {
  .t thead { display: none; }
  .t tr { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--line); }
  .t tr:last-child { border-bottom: none; }
  .t td { border-bottom: none; padding: 4px 14px; }
  .t td.sec { padding-top: 14px; }
  .t td.next { background: none; padding-bottom: 14px; }
  .t td.set::before, .t td.next::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--ink3); }
  .t td.next:empty, .t td[data-label=''] ::before { display: none; }
  .t tr.soon td.set::before { content: none; }
}
