:root{
  --bg:#f3f4f6; --surface:#ffffff; --surface-2:#f8fafc; --ink:#111827; --ink-2:#374151; --muted:#6b7280; --line:#e5e7eb;
  --brand:#0f766e; --brand-2:#115e59; --brand-soft:#ccfbf1; --accent:#ea580c;
  --green:#16a34a; --green-soft:#dcfce7; --yellow:#ca8a04; --yellow-soft:#fef9c3; --red:#dc2626; --red-soft:#fee2e2; --grey:#9ca3af; --grey-soft:#f3f4f6;
  --amber:#d97706; --blue:#2563eb;
  --radius:12px; --shadow:0 1px 2px rgba(16,24,40,.06),0 1px 3px rgba(16,24,40,.08);
  --font:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif; --font-ar:'Readex Pro','Inter',system-ui,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{font-family:var(--font);background:var(--bg);color:var(--ink);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased}
[dir=auto],textarea,input{font-family:var(--font-ar)}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
h1{font-size:22px;margin:0 0 4px;letter-spacing:-.01em}
h2{font-size:15px;margin:0 0 12px}
h3{font-size:13px;margin:16px 0 8px;color:var(--ink-2)}
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;background:var(--grey-soft);padding:2px 6px;border-radius:6px}
.muted{color:var(--muted)} .small{font-size:12px} .center{text-align:center} .num{text-align:right;white-space:nowrap}
.txt-red{color:var(--red)} .txt-green{color:var(--green)} .txt-amber{color:var(--amber)}
.prewrap{white-space:pre-wrap}

/* top bar */
.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:16px;padding:0 16px;height:56px;background:var(--surface);border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:8px;color:var(--ink);font-weight:700;white-space:nowrap}
.brand:hover{text-decoration:none}
.brand-mark{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--brand);color:#fff;font-size:12px;font-weight:800;letter-spacing:.02em}
.brand-mark.big{width:56px;height:56px;font-size:20px;border-radius:16px}
.mainnav{display:flex;gap:2px;flex:1;overflow-x:auto}
.mainnav a{display:flex;align-items:center;gap:6px;padding:8px 10px;border-radius:8px;color:var(--ink-2);font-weight:500;white-space:nowrap}
.mainnav a:hover{background:var(--grey-soft);text-decoration:none}
.mainnav a.active{background:var(--brand-soft);color:var(--brand-2)}
.ni{font-size:14px}
.me{display:flex;align-items:center;gap:12px;white-space:nowrap}
.me a{display:flex;align-items:center;gap:6px;color:var(--ink-2)}
.logout{font-size:12px;color:var(--muted)!important}
.nav-toggle{display:none;border:0;background:none;font-size:22px;cursor:pointer}

.main{padding:20px 20px 60px;max-width:1600px;margin:0 auto}
.main-bare{min-height:100vh;display:grid;place-items:center;padding:20px}

/* auth */
.auth-card{width:100%;max-width:380px;background:var(--surface);border-radius:16px;padding:28px;box-shadow:var(--shadow);text-align:center}
.auth-card form{text-align:left;margin-top:16px}
.auth-logo{margin-bottom:12px}

/* generic */
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.back{font-size:12px;color:var(--muted)}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px;margin-bottom:16px;box-shadow:var(--shadow)}
.panel.narrow{max-width:460px}
.panel.done{border-color:#86efac}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}
.panel-head h2{margin:0}
.stack{display:flex;flex-direction:column;gap:10px}
label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:600;color:var(--ink-2)}
label.chk{flex-direction:row;align-items:center;gap:6px;font-weight:500}
input,select,textarea{font:inherit;font-size:14px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);width:100%}
input[type=checkbox]{width:auto}
input[type=color]{padding:2px;height:36px;width:48px}
input:focus,select:focus,textarea:focus{outline:2px solid var(--brand-soft);border-color:var(--brand)}
textarea{resize:vertical}
fieldset{border:0;padding:0;margin:0}
fieldset[disabled] input,fieldset[disabled] select,fieldset[disabled] textarea{background:var(--surface-2);color:var(--ink-2)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.span-2{grid-column:1/-1}
.form-actions{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-top:14px;flex-wrap:wrap}
.form-actions label{min-width:200px}
.inline-form{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;margin:8px 0}
.inline-form label{width:140px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 14px;border-radius:8px;border:1px solid var(--line);background:#fff;color:var(--ink);font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}
.btn:hover{background:var(--grey-soft);text-decoration:none}
.btn-primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-2)}
.btn-warn{background:#fff7ed;border-color:#fdba74;color:#9a3412}
.btn-sm{padding:5px 10px;font-size:12px}
.btn-block{width:100%}
.linkbtn{border:0;background:none;padding:0;font:inherit;font-size:12px;color:var(--brand);cursor:pointer}
.flash{padding:10px 12px;border-radius:8px;margin-bottom:12px;font-size:13px}
.flash-ok{background:var(--green-soft);color:#14532d}
.flash-err{background:var(--red-soft);color:#7f1d1d}
.flash-warn{background:var(--yellow-soft);color:#713f12}
.hint{font-size:12px;color:var(--muted);margin-top:10px}
.tag{display:inline-block;padding:1px 7px;border-radius:999px;background:var(--grey-soft);color:var(--ink-2);font-size:11px;font-weight:600;white-space:nowrap}
.tag-pf-meta{background:#dbeafe;color:#1e40af}
.tag-pf-tiktok{background:#111827;color:#fff}
.tag-hook{background:#ffedd5;color:#9a3412}
.tag-ok{background:var(--green-soft);color:#166534}
.tag-bad{background:var(--red-soft);color:#991b1b}
.seg{display:inline-flex;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:3px;gap:2px;flex-wrap:wrap}
.seg a{padding:6px 12px;border-radius:7px;color:var(--ink-2);font-weight:500;font-size:13px}
.seg a.on{background:var(--brand);color:#fff}
.seg a:hover{text-decoration:none}

/* avatars */
.avatar{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:50%;color:#fff;font-size:12px;font-weight:700;flex:none;vertical-align:middle}
.avatar.xs{width:22px;height:22px;font-size:9px}
.avatar.sm{width:26px;height:26px;font-size:10px}
.avatar.lg{width:54px;height:54px;font-size:18px}
.avatar-empty{background:var(--line);color:var(--muted)}

/* filters */
.filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.filters select,.filters input[type=search]{width:auto;min-width:160px}

/* board */
.board{display:flex;gap:12px;overflow-x:auto;padding-bottom:12px;align-items:flex-start;scroll-snap-type:x proximity}
.col-winner,.col-loser{flex-basis:210px!important}
.col{flex:0 0 244px;background:#e9ebef;border-radius:var(--radius);display:flex;flex-direction:column;max-height:calc(100vh - 220px);scroll-snap-align:start}
.col-head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;font-weight:700;font-size:13px}
.col-count{background:#fff;border-radius:999px;padding:0 8px;font-size:12px;color:var(--muted)}
.col-review .col-head{color:#9a3412}
.col-winner .col-head{color:#166534}
.col-body{padding:0 8px 8px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;min-height:60px}
.col.drop-over{outline:2px dashed var(--brand);outline-offset:-4px;background:#e0f2f1}
.col-empty{color:var(--grey);text-align:center;padding:12px 0}
.col-foot{font-size:11px;color:var(--muted);padding:0 12px 10px}
.tile{display:block;background:var(--surface);border-radius:10px;box-shadow:var(--shadow);color:var(--ink);overflow:hidden;border-left:4px solid transparent;cursor:grab}
.tile:hover{text-decoration:none;box-shadow:0 4px 12px rgba(16,24,40,.12)}
.tile.is-late{border-left-color:var(--red)}
.tile.is-stale{border-left-color:var(--amber)}
.tile.dragging{opacity:.4}
.tile-thumb{height:120px;background:#ddd center/cover no-repeat}
.tile-body{padding:10px}
.tile-tags{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:6px}
.tile-title{font-weight:600;font-size:13px;line-height:1.35;word-break:break-word}
.tile-product{font-size:12px;color:var(--muted);margin-top:2px}
.tile-result{display:flex;align-items:center;gap:6px;margin-top:8px;font-size:12px;font-weight:600;padding:4px 8px;border-radius:6px;background:var(--grey-soft)}
.tile-foot{display:flex;align-items:center;gap:6px;margin-top:8px}
.tile-icons{margin-left:auto;display:flex;gap:6px;font-size:11px;color:var(--muted)}
.due{font-size:11px;color:var(--muted)}
.due-late{color:var(--red);font-weight:700}
.due-stale{color:var(--amber);font-weight:700}

/* status dots */
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--grey);flex:none}
.dot.big{width:18px;height:18px}
.dot-inline{margin-right:6px;vertical-align:middle;width:9px;height:9px;display:inline-block;border-radius:50%;background:var(--grey)}
.dot-green .dot,.dot-inline.dot-green,.verdict-green .dot,.row-green .dot-inline{background:var(--green)}
.dot-yellow .dot,.dot-inline.dot-yellow,.verdict-yellow .dot,.row-yellow .dot-inline{background:var(--yellow)}
.dot-red .dot,.dot-inline.dot-red,.verdict-red .dot,.row-red .dot-inline{background:var(--red)}
.dot-green.tile-result{background:var(--green-soft)} .dot-yellow.tile-result{background:var(--yellow-soft)} .dot-red.tile-result{background:var(--red-soft)}
.legend{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;margin-bottom:14px;align-items:center}

/* card page */
.card-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}
.stage-pill{display:inline-block;padding:2px 10px;border-radius:999px;background:var(--grey-soft);font-weight:600;color:var(--ink-2)}
.stage-review{background:#ffedd5;color:#9a3412} .stage-test{background:#dbeafe;color:#1e40af} .stage-winner{background:var(--green-soft);color:#166534} .stage-loser{background:var(--red-soft);color:#991b1b} .stage-ready{background:#ede9fe;color:#5b21b6}
.verdict{border-radius:10px;padding:12px 14px;margin:8px 0 12px;background:var(--grey-soft)}
.verdict-green{background:var(--green-soft)} .verdict-yellow{background:var(--yellow-soft)} .verdict-red{background:var(--red-soft)}
.verdict-main{display:flex;gap:12px;align-items:center}
.verdict-label{font-weight:700;font-size:15px}
.kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
.kpi{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column}
.kpi b{font-size:17px}
.kpi span{font-size:11px;color:var(--muted)}
.kpi-admin{border-style:dashed}
.move-form{display:flex;flex-direction:column;gap:10px}
.move-buttons{display:flex;gap:8px;flex-wrap:wrap}
.hook-example{background:#fff7ed;border:1px solid #fed7aa;border-radius:8px;padding:8px 10px;font-size:13px;font-family:var(--font-ar)}
.darija-warn{background:var(--yellow-soft);border-radius:8px;padding:8px 10px;font-size:12px;color:#713f12}
.side-thumb{width:100%;border-radius:8px;margin-bottom:10px;max-height:320px;object-fit:contain;background:#f1f1f1}
.files{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:8px}
.files li{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding-bottom:8px;border-bottom:1px solid var(--line)}
.file-mini{width:44px;height:44px;object-fit:cover;border-radius:6px;vertical-align:middle;margin-right:6px}
.file-video{width:100%;border-radius:8px;max-height:260px;background:#000}
.file-name{font-weight:600;word-break:break-all}
.file-actions{margin-left:auto;display:flex;gap:8px}
.file-actions form{display:inline}
.drop{border:1.5px dashed var(--line);border-radius:10px;padding:12px;text-align:center;cursor:pointer;font-weight:500;color:var(--ink-2)}
.drop input{margin-top:6px;border:0;padding:0}
.comments{list-style:none;margin:0 0 10px;padding:0;display:flex;flex-direction:column;gap:10px}
.comments li{display:flex;gap:8px}
.cm-body{margin-top:2px}
.events{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:12px}
.danger-zone{display:flex;gap:16px;margin-top:14px;padding-top:10px;border-top:1px solid var(--line)}
.danger-zone form{display:inline}

/* tables */
.table-wrap{overflow-x:auto}
.table{width:100%;border-collapse:collapse}
.table th{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);text-align:left;padding:8px;border-bottom:1px solid var(--line);white-space:nowrap}
.table td{padding:8px;border-bottom:1px solid var(--line);vertical-align:middle}
.table tr:last-child td{border-bottom:0}
.small-table td,.small-table th{padding:5px 6px}
.tests-table .t-thumb img{width:48px;height:48px;object-fit:cover;border-radius:6px;display:block}
.tests-table .t-thumb{width:56px}
.tests-table .t-title{min-width:220px}
.tests-table .t-people{white-space:nowrap}
.tests-table .t-suggest{white-space:nowrap;font-weight:600;font-size:12px}
.row-green td:first-child{box-shadow:inset 4px 0 var(--green)} .row-yellow td:first-child{box-shadow:inset 4px 0 var(--yellow)} .row-red td:first-child{box-shadow:inset 4px 0 var(--red)}
.progress{height:6px;background:var(--line);border-radius:99px;overflow:hidden;min-width:70px;margin-bottom:3px}
.progress span{display:block;height:100%;background:var(--brand);border-radius:99px}
.in-num{width:90px;text-align:right}
code.copy{cursor:pointer}
code.copied{background:var(--green-soft)}

/* winners */
.kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:16px}
.kpi-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px;display:flex;flex-direction:column;gap:4px;box-shadow:var(--shadow)}
.kpi-card b{font-size:26px;letter-spacing:-.02em}
.kpi-card b small{font-size:14px;color:var(--muted);font-weight:600}
.kpi-title{font-size:12px;color:var(--muted);font-weight:600}
.kpi-goal{border-color:#99f6e4;background:linear-gradient(180deg,#f0fdfa,#fff)}
.wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.wall-item{background:var(--surface);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);color:var(--ink);border:1px solid var(--line)}
.wall-item:hover{text-decoration:none;box-shadow:0 6px 18px rgba(16,24,40,.12)}
.wall-thumb{position:relative;aspect-ratio:4/5;background:#eef2f1 center/cover no-repeat;display:grid;place-items:center;font-size:40px}
.live-badge{position:absolute;top:8px;left:8px;background:var(--green);color:#fff;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px}
.wall-body{padding:10px 12px}
.wall-stats{margin-top:6px;font-size:13px}
.wall-lesson{margin-top:6px;font-size:12px;color:var(--ink-2);background:var(--surface-2);padding:6px 8px;border-radius:6px}

/* team */
.podium{display:flex;gap:12px;justify-content:center;align-items:flex-end;margin-bottom:16px;flex-wrap:wrap}
.podium-item{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 18px;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:170px;box-shadow:var(--shadow)}
.podium-item.p1{order:2;padding-top:24px;border-color:#fde68a}
.podium-item.p2{order:1} .podium-item.p3{order:3}
.medal{font-size:26px}
.podium-stat{font-size:12px;font-weight:600;color:var(--brand-2)}

/* journal */
.journal-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.mini-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:13px}
.mini-list li{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.history{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.history li{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.journal-table td,.journal-table th{padding:6px 4px}
.jcell{display:inline-flex;flex-direction:column;align-items:center;font-size:18px;line-height:1}
.jcell small{font-size:10px;color:var(--muted);margin-top:2px}
.jcell:hover{text-decoration:none}

/* lessons */
.lessons-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}
.lesson-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.lesson{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.lesson:last-child{border-bottom:0}
.lesson-icon{font-size:18px}
.lesson-text{font-weight:600}

/* admin */
.admin-tabs{margin-left:auto}
.user-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--line)}
.user-row input[name=name]{width:150px}
.user-row input[name=job]{width:170px}
.user-row input[name=password]{width:180px}
.user-row select{width:150px}

@media (max-width:1100px){
  .card-layout,.lessons-layout{grid-template-columns:1fr}
}
@media (max-width:1100px){
  .nav-toggle{display:block;margin-left:auto}
  .mainnav{display:none;position:absolute;top:56px;left:0;right:0;flex-direction:column;background:var(--surface);border-bottom:1px solid var(--line);padding:8px;max-height:calc(100vh - 56px);overflow-y:auto;box-shadow:0 8px 20px rgba(15,23,42,.08)}
  body.nav-open .mainnav{display:flex}
  .me-name{display:none}
}
@media (max-width:860px){
  .main{padding:16px 16px 60px}
  .form-grid,.journal-grid{grid-template-columns:1fr}
  .col{flex-basis:82vw;max-height:none}
  .filters select,.filters input[type=search]{min-width:0;flex:1 1 140px}
  .brand-name{display:none}
}

/* sales */
.head-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.chart{width:100%;height:auto;display:block}
.chart .grid{stroke:var(--line);stroke-width:1}
.chart .axis{font-size:11px;fill:var(--muted);font-family:var(--font)}
.chart .bar-all{fill:#99d5cf}
.chart .bar-client{fill:var(--brand)}
.chart .goal{stroke:var(--accent);stroke-width:1.5;stroke-dasharray:6 4}
.chart .goal-label{fill:var(--accent);font-weight:600}
.legend-inline{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--muted);flex-wrap:wrap}
.sw{display:inline-block;width:12px;height:12px;border-radius:3px;margin-left:8px}
.sw-all{background:#99d5cf} .sw-client{background:var(--brand)} .sw-goal{background:var(--accent);height:3px}
.kpi-admin-card{border-style:dashed;border-color:#94a3b8}
.safe-box{border-color:#99f6e4;background:linear-gradient(180deg,#f0fdfa,#fff)}
.checklist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.row-muted td{color:var(--muted)}

/* ---------- v3: My day, swipe file, weekly report ---------- */
.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;margin-left:4px;border-radius:999px;background:#dc2626;color:#fff;font-size:11px;font-weight:700;line-height:1}
.home-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:16px}
.home-grid>.panel{margin-bottom:16px}
.mt{margin-top:14px}
.goal-line{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:6px 0 10px}
.goal-line>div{display:flex;flex-direction:column}
.goal-line b{font-size:24px;letter-spacing:-.02em}
.progress.big{height:10px}
.spark{display:flex;align-items:flex-end;gap:6px;height:70px;margin-top:10px}
.spark-col{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:3px}
.spark-col span{display:block;width:100%;max-width:34px;background:var(--brand);border-radius:4px 4px 0 0;opacity:.85}
.spark-col small{font-size:10px;color:var(--muted)}
.check-steps{list-style:none;margin:0 0 10px;padding:0;display:flex;flex-direction:column;gap:6px}
.check-steps li.done{color:var(--muted)}
.todo-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.todo-list li a{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 6px;border-bottom:1px solid var(--line);color:var(--ink)}
.todo-list li:last-child a{border-bottom:0}
.todo-list li a:hover{background:var(--grey-soft);text-decoration:none}
.todo-title{font-weight:600;flex:1;min-width:160px}
.stage-pill.sm{font-size:11px;padding:1px 8px}
.suggest{font-size:12px;font-weight:600;padding:2px 8px;border-radius:999px;background:var(--grey-soft)}
.suggest-winner{background:#dcfce7;color:#166534}
.suggest-kill{background:#fee2e2;color:#991b1b}
.suggest-iterate{background:#fef9c3;color:#854d0e}
.suggest-starved,.suggest-tired{background:#ffedd5;color:#9a3412}
.panel-review{border-color:#f59e0b;background:linear-gradient(0deg,#fffbeb,#fff 60%)}
.feed{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;font-size:13px}
.feed li{display:flex;gap:8px;align-items:flex-start}
.feed li.is-new{background:#f0fdfa;border-radius:8px;padding:4px 6px;margin:-4px -6px}
.new-dot{color:#0f766e;font-weight:700}
.panel-flat{margin-bottom:12px}
.swipe-add[hidden]{display:none}
.swipe-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.swipe{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--shadow)}
.swipe-media{position:relative;background:#0f172a;aspect-ratio:4/5;display:flex;align-items:center;justify-content:center}
.swipe-media img,.swipe-media video{width:100%;height:100%;object-fit:cover;display:block}
.swipe-media>a{display:block;width:100%;height:100%}
.swipe-link-only{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#cbd5e1;font-weight:600;background:linear-gradient(135deg,#0f766e,#1e293b)}
.swipe-link-only span{font-size:34px}
.swipe-pf{position:absolute;top:8px;left:8px;background:rgba(255,255,255,.92)}
.swipe-body{padding:10px 12px;display:flex;flex-direction:column;gap:6px;flex:1}
.swipe-notes{margin:0;font-size:13px;color:var(--ink-2);max-height:7.5em;overflow:auto}
.swipe-foot{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:auto}
.swipe-by{display:flex;align-items:center;gap:4px;margin-left:auto}
.vote.voted{background:#fff7ed;border-color:#fb923c;color:#9a3412}
.delta{font-size:12px;font-weight:700;color:var(--muted)}
.delta-up{color:#15803d}
.delta-down{color:#b91c1c}
.report-text{width:100%;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;background:#f8fafc}
@media (max-width:860px){
  .goal-line{grid-template-columns:repeat(2,1fr)}
  .swipe-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
  .todo-title{min-width:0;flex-basis:100%}
}

/* compact top bar on laptops (all menu items fit from 1100px) */
.mainnav{scrollbar-width:none}
.mainnav::-webkit-scrollbar{display:none}
@media (min-width:1101px) and (max-width:1440px){
  .topbar{gap:10px;padding:0 12px}
  .brand-name{display:none}
  .mainnav a{padding:7px 8px;font-size:13px;gap:4px}
  .me-name{display:none}
}
.swipe-media.no-media{aspect-ratio:16/9}
.spark-tall{height:140px}
.trend{margin:10px 0 4px}
