/* =========================================================
   רגע NEWS — חדר חדשות
   צבעי המותג: נייבי, כחול רויאל, טורקיז. דף בהיר כמו באתר.
   ========================================================= */

:root {
  /* מותג */
  --navy: #0a1452;
  --navy-deep: #060d3a;
  --royal: #1b4dff;
  --cyan: #00e0ff;
  --cyan-ink: #0096b8;        /* טורקיז קריא על רקע בהיר */

  --paper: #f3f5fa;
  --paper-2: #e8ecf5;
  --card: #ffffff;
  --ink: #0a1452;
  --ink-2: #3b4572;
  --muted: #7d85a6;
  --rule: #dce1ee;
  --rule-soft: #e8ecf4;
  --signal: var(--royal);
  --ok: #0f9a63;
  --err: #e0352b;
  --warn: #c98200;
  --sim: #6f4ff2;
  --idle: #9aa1bd;
  --shadow: 0 1px 0 rgba(10, 20, 82, .04), 0 14px 40px -14px rgba(10, 20, 82, .22);
  --serif: 'Rubik', system-ui, sans-serif;
  --sans: 'Rubik', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #070d33; --paper-2: #0e1745; --card: #0d1645; --ink: #f2f5ff; --ink-2: #c3cae6; --muted: #8590bd;
  --rule: #1d2860; --rule-soft: #162055; --ok: #35d39a; --err: #ff6b61; --warn: #ffb53d; --sim: #a891ff; --idle: #5f6a99;
  --cyan-ink: var(--cyan); --shadow: 0 14px 40px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #070d33; --paper-2: #0e1745; --card: #0d1645; --ink: #f2f5ff; --ink-2: #c3cae6; --muted: #8590bd;
    --rule: #1d2860; --rule-soft: #162055; --ok: #35d39a; --err: #ff6b61; --warn: #ffb53d; --sim: #a891ff; --idle: #5f6a99;
    --cyan-ink: var(--cyan); --shadow: 0 14px 40px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
html { overflow-x: clip; }
body { font: 15px/1.55 var(--sans); min-height: 100vh; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--cyan); color: var(--navy); }

/* חצי המותג — כמו בבאנר */
.arrows {
  background-color: var(--navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='240' fill='none' stroke='%231b4dff' stroke-opacity='.75' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M28 30h36a6 6 0 0 1 6 6v36a6 6 0 0 1-12 0V50L36 72a6 6 0 0 1-8-8l22-22H28a6 6 0 0 1 0-12z'/%3E%3Cpath d='M128 124h26a5 5 0 0 1 5 5v26a5 5 0 0 1-10 0v-14l-16 16a5 5 0 0 1-7-7l16-16h-14a5 5 0 0 1 0-10z' opacity='.7'/%3E%3C/svg%3E");
}
[hidden] { display: none !important; }
svg { flex-shrink: 0; }

/* ---------- masthead ---------- */
.mast { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; box-shadow: 0 6px 24px -10px rgba(6, 13, 58, .6); }
.mast-inner { max-width: 1120px; margin: 0 auto; padding: 0 28px; height: 64px; display: flex; align-items: center; gap: 36px; }
/* לוגו בסגנון המותג: "רגע" לבן, NEWS טורקיז, סלוגן מתחת */
.logo { display: grid; grid-template-columns: auto auto; align-items: end; column-gap: 4px; text-decoration: none; line-height: 1; }
.logo .he { font-weight: 900; font-size: 25px; letter-spacing: -.5px; color: #fff; }
.logo .en { font-weight: 800; color: var(--cyan); font-size: 25px; letter-spacing: -.5px; font-stretch: condensed; }
.logo .tag { grid-column: 1 / -1; font-size: 10px; color: var(--cyan); font-weight: 500; margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.logo .tag::before { content: ''; width: 18px; height: 1px; background: var(--cyan); }
.nav { display: flex; gap: 26px; }
.nav button {
  white-space: nowrap; background: none; border: 0; padding: 6px 0; cursor: pointer; color: rgba(255, 255, 255, .6); font-weight: 500; font-size: 14.5px;
  position: relative; transition: color .2s;
}
.nav button:hover { color: #fff; }
.nav button.active { color: #fff; }
.nav button.active::after { content: ''; position: absolute; inset-inline: 0; bottom: -2px; height: 3px; background: var(--cyan); border-radius: 3px; }
.mast .grow { flex: 1; }
.mast-tools { display: flex; align-items: center; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .2px; border: 1px solid var(--rule); color: var(--ink-2); white-space: nowrap;
}
.mast .chip { border-color: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .85); }
.mast .chip.sim { color: #c9bbff; border-color: rgba(201, 187, 255, .35); }
.mast .chip.on { color: var(--cyan); border-color: rgba(0, 224, 255, .4); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--idle); position: relative; }
.pulse.live { background: var(--cyan); }
.pulse.live::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--cyan); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.ghost-btn {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 0; background: none;
  color: var(--ink-2); cursor: pointer; transition: background .2s;
}
.ghost-btn:hover { background: var(--paper-2); }
.mast .ghost-btn { color: rgba(255, 255, 255, .8); }
.mast .ghost-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ghost-btn svg { width: 17px; height: 17px; }

/* ---------- ticker ---------- */
.ticker { background: var(--royal); color: #fff; height: 38px; display: flex; align-items: center; overflow: hidden; font-size: 14px; font-weight: 500; }
.ticker-label {
  background: var(--cyan); color: var(--navy); height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 18px;
  font-weight: 900; letter-spacing: .5px; flex-shrink: 0; position: relative; z-index: 1;
}
.ticker-label .pulse.live { background: var(--navy); }
.ticker-label .pulse.live::after { border-color: var(--navy); }
.ticker-track { display: flex; gap: 0; white-space: nowrap; animation: crawl var(--crawl, 40s) linear infinite; padding-inline-start: 24px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { padding: 0 22px; position: relative; }
.ticker-track span::before { content: ''; position: absolute; inset-inline-start: 0; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); transform: translateY(-50%); }
.ticker-track b { font-weight: 700; color: var(--cyan); margin-inline-end: 8px; font-variant-numeric: tabular-nums; }
@keyframes crawl { from { transform: translateX(0); } to { transform: translateX(50%); } }
.ticker-empty { padding: 0 24px; opacity: .6; }

main { max-width: 1120px; margin: 0 auto; padding: 0 28px 80px; }

/* ---------- hero ---------- */
/* כרטיס נייבי עם חצי המותג — כמו הבאנר */
.hero {
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; margin-top: 32px; padding: 44px 48px;
  border-radius: 28px; color: #fff; position: relative; overflow: hidden; isolation: isolate;
  box-shadow: 0 30px 60px -30px rgba(6, 13, 58, .55);
}
.hero::before { /* צורות המותג בפינה */
  content: ''; position: absolute; z-index: -1; inset-inline-end: -40px; top: -40px; width: 230px; height: 280px;
  background: var(--royal); border-radius: 0 0 0 90px; transform: skewX(0);
}
.hero::after {
  content: ''; position: absolute; z-index: -1; inset-inline-end: 70px; bottom: -60px; width: 150px; height: 190px;
  background: var(--cyan); border-radius: 0 60px 0 0;
}
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--cyan-ink); margin-bottom: 10px; }
.hero .eyebrow { color: var(--cyan); }
.hero h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(40px, 6vw, 68px); line-height: .95; margin: 0; letter-spacing: -1.5px; }
.hero h1 em { font-style: normal; color: var(--cyan); }
.hero .summary { margin-top: 18px; font-size: 16.5px; color: rgba(255, 255, 255, .78); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero .summary [style*="--sim"], .hero .summary .simnote { color: #c9bbff !important; }
.hero .summary span { display: inline-flex; align-items: center; gap: 8px; }
.hero .summary i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hero .summary button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.hero .summary button:hover { text-decoration: underline; text-underline-offset: 4px; }
.bignum {
  text-align: center; background: rgba(6, 13, 58, .55); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px; padding: 22px 30px 18px; min-width: 200px;
}
.bignum b { display: block; font-family: var(--serif); font-weight: 900; font-size: clamp(72px, 9vw, 112px); line-height: .85; letter-spacing: -3px; font-variant-numeric: tabular-nums; color: var(--cyan); }
.bignum span { font-size: 13px; color: rgba(255, 255, 255, .75); font-weight: 500; display: block; margin-top: 8px; }

.alert {
  margin-top: 24px; display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-radius: 14px; max-width: 560px;
  background: rgba(255, 92, 80, .16); color: #ffb3ac; font-weight: 500; cursor: pointer;
  border: 1px solid rgba(255, 92, 80, .4); transition: background .2s;
}
.alert:hover { background: rgba(255, 92, 80, .24); }
.alert svg { width: 20px; height: 20px; }
.alert .go { margin-inline-start: auto; font-weight: 700; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 16px; padding: 22px 0 10px; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button {
  border: 0; background: none; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--ink-2);
  font-weight: 500; display: inline-flex; gap: 7px; align-items: center; transition: background .2s, color .2s;
}
.seg button em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg button.active { background: var(--navy); color: #fff; box-shadow: 0 4px 12px -4px rgba(10, 20, 82, .5); }
.seg button.active em { color: var(--cyan); }
.search { margin-inline-start: auto; position: relative; }
.search input {
  width: 220px; height: 38px; border-radius: 12px; border: 1px solid transparent; background: var(--paper-2);
  padding: 0 38px 0 14px; transition: width .3s var(--ease), border-color .2s, background .2s;
}
.search input:focus { outline: none; width: 300px; background: var(--card); border-color: var(--ink); }
.search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }

/* ---------- feed ---------- */
.feed { position: relative; }
.day { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--muted); padding: 26px 0 10px; }
.row {
  display: grid; grid-template-columns: 74px 1fr auto; gap: 22px; align-items: start; padding: 20px 0;
  border-bottom: 1px solid var(--rule-soft); cursor: pointer; position: relative; animation: rise .5s var(--ease) both;
}
.row::before { content: ''; position: absolute; inset: 0 -18px; border-radius: 16px; background: var(--card); opacity: 0; transition: opacity .2s; z-index: -1; box-shadow: var(--shadow); }
.row:hover::before { opacity: 1; }
.row:hover { border-bottom-color: transparent; }
.feed { isolation: isolate; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.row .time { font-family: var(--serif); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.row .time small { display: block; font-family: var(--sans); font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.row .kicker { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-bottom: 4px; letter-spacing: .2px; }
.row .kicker .k { color: var(--ink); }
.row h3 { font-family: var(--serif); font-weight: 700; font-size: 23px; line-height: 1.25; margin: 0; letter-spacing: -.2px; }
.row .ex { color: var(--ink-2); margin-top: 4px; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; margin-top: 10px; color: var(--c); }
.state i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }
.state.spin i { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.state .sim-tag { color: var(--sim); font-size: 12px; border: 1px solid color-mix(in srgb, var(--sim) 35%, transparent); padding: 0 7px; border-radius: 99px; }
.thumb { width: 116px; height: 78px; border-radius: 12px; overflow: hidden; background: var(--paper-2); display: grid; place-items: center; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb svg { width: 22px; height: 22px; }
.row.flash h3 { animation: flash 2.2s var(--ease); }
@keyframes flash { 0%, 30% { color: var(--signal); } 100% { color: inherit; } }

/* שורה מדולגת — קטנה ושקטה */
.row.quiet { grid-template-columns: 74px 1fr; padding: 10px 0; color: var(--muted); }
.row.quiet .time { font-size: 15px; color: var(--muted); }
.row.quiet .line { font-size: 14px; display: flex; gap: 10px; align-items: center; padding-top: 2px; }
.row.quiet .line svg { width: 15px; height: 15px; }

.empty { text-align: center; padding: 90px 20px; color: var(--muted); }
.empty h4 { font-family: var(--serif); font-size: 26px; color: var(--ink); margin: 0 0 6px; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10, 10, 10, .35); backdrop-filter: blur(3px); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(620px, 100%); background: var(--paper); z-index: 41;
  transform: translateX(-104%); transition: transform .45s var(--ease), visibility 0s .45s; overflow-y: auto; box-shadow: var(--shadow);
  border-inline-start: 1px solid var(--rule); visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; transition: transform .45s var(--ease); }
.drawer-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 14px 22px; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule-soft); }
.drawer-top .grow { flex: 1; }
.drawer-body { padding: 28px 34px 50px; }
.verdict { display: flex; align-items: center; gap: 14px; }
.verdict .big-dot { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c); }
.verdict .big-dot svg { width: 22px; height: 22px; }
.verdict b { display: block; font-size: 19px; font-weight: 700; }
.verdict span { color: var(--muted); font-size: 13.5px; }
.verdict .open-post { margin-inline-start: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; transition: transform .15s, opacity .2s;
}
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.97); }
.btn.line { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.line:hover { border-color: var(--ink); opacity: 1; }
.btn.signal { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn svg { width: 16px; height: 16px; }

/* stepper */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); margin: 30px 0 6px; position: relative; }
.stepper .s { position: relative; text-align: center; font-size: 12.5px; color: var(--muted); padding-top: 34px; }
.stepper .s::before { content: ''; position: absolute; top: 11px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--rule); }
.stepper .s:last-child::before { display: none; }
.stepper .s.done::before { background: var(--ink); }
.stepper .s .n {
  position: absolute; top: 0; inset-inline-start: 50%; transform: translateX(50%); width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--rule); display: grid; place-items: center; z-index: 1; transition: all .3s;
}
.stepper .s .n svg { width: 12px; height: 12px; }
.stepper .s.done .n { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.stepper .s.done { color: var(--ink); font-weight: 600; }
.stepper .s.fail .n { background: var(--err); border-color: var(--err); color: #fff; }
.stepper .s.fail { color: var(--err); font-weight: 600; }
.stepper .s.skip .n { border-style: dashed; }
.stepper .s.now .n { border-color: var(--ink); animation: blink 1s infinite; }

.errmsg { margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--err) 9%, transparent); color: var(--err); font-size: 14.5px; display: flex; gap: 14px; align-items: center; }
.errmsg > svg { width: 20px; height: 20px; }
.errmsg .btn { margin-inline-start: auto; flex-shrink: 0; height: 34px; }

/* article preview */
.article { margin-top: 30px; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.article .media { aspect-ratio: 16/9; background: var(--paper-2); display: grid; place-items: center; color: var(--muted); }
.article .media img, .article .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.article .media svg { width: 34px; height: 34px; }
.article .cap { font-size: 12px; color: var(--muted); padding: 8px 26px 0; }
.article .txt { padding: 20px 26px 26px; }
.article .kick { color: var(--signal); font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.article h2 { font-family: var(--serif); font-weight: 900; font-size: 30px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -.5px; }
.article .lede { font-size: 17px; color: var(--ink-2); font-weight: 500; line-height: 1.6; margin: 0 0 16px; }
.article p { font-family: var(--serif); font-size: 17px; line-height: 1.8; margin: 0 0 12px; }
.article .byline { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule-soft); padding-top: 14px; margin-top: 8px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: 12px; text-transform: uppercase; }

.facts { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule-soft); border-radius: 14px; overflow: hidden; }
.facts div { background: var(--paper); padding: 12px 16px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; font-size: 14px; word-break: break-all; }

.fold { margin-top: 18px; border-top: 1px solid var(--rule); }
.fold summary { list-style: none; cursor: pointer; padding: 14px 0; font-size: 14px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: '+'; width: 18px; font-size: 18px; font-weight: 400; color: var(--muted); }
.fold[open] summary::before { content: '−'; }
.log { list-style: none; margin: 0 0 16px; padding: 0; font-size: 13.5px; }
.log li { display: grid; grid-template-columns: 70px 12px 1fr; gap: 10px; padding: 7px 0; align-items: start; }
.log .t { color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; text-align: right; }
.log .d { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--c, var(--idle)); }
.log .m b { font-weight: 600; }
.log .m small { display: block; color: var(--muted); word-break: break-word; }
pre.code { direction: ltr; text-align: left; background: var(--paper-2); border-radius: 12px; padding: 14px; overflow: auto; max-height: 340px; font: 12px/1.6 ui-monospace, Consolas, monospace; color: var(--ink-2); margin: 0 0 16px; }
pre.orig { direction: rtl; text-align: right; white-space: pre-wrap; font: 14.5px/1.7 var(--sans); }

/* ---------- settings ---------- */
.page-head { padding: 56px 0 28px; border-bottom: 1px solid var(--ink); margin-bottom: 34px; }
.page-head h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(36px, 5vw, 56px); line-height: 1; margin: 0; letter-spacing: -1px; }
.page-head p { color: var(--ink-2); margin: 12px 0 0; font-size: 16px; }

.inp {
  width: 100%; height: 40px; border-radius: 11px; border: 1px solid var(--rule); background: var(--card); padding: 0 12px; transition: border-color .2s;
}
.inp:focus { outline: none; border-color: var(--ink); }
.ltr { direction: ltr; text-align: left; }
.set h3 { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--muted); margin: 0 0 14px; }

.set { display: grid; grid-template-columns: 220px 1fr; gap: 30px; padding: 30px 0; border-bottom: 1px solid var(--rule); }
.set:first-child { padding-top: 0; }
.set .lbl h2 { font-size: 18px; margin: 0 0 4px; font-weight: 700; }
.set .lbl p { margin: 0; color: var(--muted); font-size: 14px; }
.copy { display: flex; gap: 8px; }
.copy .inp { flex: 1; font-size: 13px; background: var(--paper-2); border-color: transparent; }
.authors { display: grid; gap: 8px; }
.author-row { display: grid; grid-template-columns: 1fr 1fr 36px; gap: 8px; align-items: center; }
.author-row .x { height: 36px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 10px; font-size: 16px; }
.author-row .x:hover { background: var(--paper-2); color: var(--err); }
.row-actions { display: flex; gap: 8px; margin-top: 14px; }
.conn { margin-top: 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper);
  padding: 12px 20px; border-radius: 14px; font-weight: 500; opacity: 0; transition: all .35s var(--ease); pointer-events: none; z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.login-wrap { display: grid; place-items: center; padding: 24px; }
.login { width: min(400px, 100%); }
.login h1 { font-family: var(--serif); font-weight: 900; font-size: 54px; line-height: .95; margin: 0 0 8px; letter-spacing: -1.5px; }
.login h1 em { font-style: normal; color: var(--cyan); font-family: var(--sans); font-weight: 800; }
.login-page { background: var(--navy); color: #fff; }
.login-wrap.arrows { background-color: transparent; }
.login p { color: rgba(255, 255, 255, .7) !important; }
.login .inp { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #fff; }
.login .inp::placeholder { color: rgba(255, 255, 255, .5); }
.login .inp:focus { border-color: var(--cyan); }
.login .btn { background: var(--cyan); border-color: var(--cyan); color: var(--navy); font-weight: 800; }
.login .err { color: #ff9a92 !important; }
.login p { color: var(--ink-2); margin: 0 0 30px; }
.login .inp { height: 50px; font-size: 16px; margin-bottom: 12px; }
.login .btn { width: 100%; height: 50px; justify-content: center; font-size: 15px; }
.login .err { color: var(--err); min-height: 22px; margin-top: 12px; font-size: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .mast-inner { padding: 10px 16px 0; gap: 0 12px; height: auto; flex-wrap: wrap; }
  .nav { gap: 20px; order: 3; width: 100%; height: 42px; align-items: center; }
  .nav button.active::after { bottom: -9px; }
  .chip .lbl { display: none; }
  main { padding: 0 16px 60px; }
  .hero { grid-template-columns: 1fr; gap: 22px; padding: 30px 22px; margin-top: 18px; border-radius: 22px; }
  .hero::before { width: 110px; height: 140px; border-radius: 0 0 0 50px; }
  .hero::after { display: none; }
  .bignum { text-align: start; display: flex; align-items: baseline; gap: 12px; padding: 16px 20px; }
  .bignum span { margin: 0; }
  .toolbar { flex-wrap: wrap; }
  .search { margin: 0; width: 100%; }
  .search input, .search input:focus { width: 100%; }
  .row { grid-template-columns: 52px 1fr; gap: 14px; }
  .row .time { font-size: 17px; }
  .row .thumb { display: none; }
  .row.quiet { grid-template-columns: 52px 1fr; }
  .row h3 { font-size: 19px; }
  .drawer-body { padding: 22px 18px 40px; }
  .set { grid-template-columns: 1fr; gap: 16px; }
  .facts { grid-template-columns: 1fr; }
  .seg { overflow-x: auto; max-width: 100%; }
}
@media (max-width: 520px) {
  #mode-chip { display: none; }
  .row .time small { display: none; }
  .hero .bignum b { font-size: 72px; letter-spacing: -2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- קטגוריה, תגיות, שרשור ---------- */
.row .kicker .cat { background: color-mix(in srgb, var(--royal) 10%, transparent); color: var(--royal); padding: 1px 9px; border-radius: 99px; font-weight: 700; }
:root[data-theme="dark"] .row .kicker .cat { color: var(--cyan); background: rgba(0, 224, 255, .1); }
.row .reply-to { font-size: 13px; color: var(--ink-2); margin-bottom: 3px; }
.state .replies { color: var(--muted); font-size: 12.5px; border-inline-start: 1px solid var(--rule); padding-inline-start: 10px; }
.article .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.article .tags span { font-size: 13px; font-weight: 600; color: var(--royal); background: color-mix(in srgb, var(--royal) 8%, transparent); padding: 3px 10px; border-radius: 99px; }

.thread { margin-top: 28px; }
.thread h4 { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--muted); margin: 0 0 10px; }
.t-item {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "role title st" "role meta st"; gap: 2px 12px; align-items: center;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--rule); background: var(--card); cursor: pointer; margin-bottom: 8px;
  transition: border-color .2s, transform .15s;
}
.t-item:hover { border-color: var(--royal); }
.t-item .role { grid-area: role; font-size: 11px; font-weight: 700; color: var(--royal); background: color-mix(in srgb, var(--royal) 9%, transparent); padding: 4px 8px; border-radius: 8px; }
.t-item b { grid-area: title; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-item .meta { grid-area: meta; font-size: 12.5px; color: var(--muted); }
.t-item .st { grid-area: st; font-size: 12.5px; font-weight: 600; color: var(--c); display: inline-flex; align-items: center; gap: 6px; }
.t-item .st i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.t-item.missing { display: block; cursor: default; color: var(--warn); font-size: 13.5px; border-style: dashed; }

.cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 10px; }
.cats span { font-size: 13px; padding: 4px 11px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); font-weight: 500; }
.hint-line { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
