/* Deadline — web. Visual language after format-3.co: pure black, white at
   opacities, hairlines, wide uppercase display type, pills, slow easings. */

:root {
  --bg: #000;
  --fg: #fff;
  --fg-2: rgb(255 255 255 / .55);
  --fg-3: rgb(255 255 255 / .4);
  --dim: rgb(255 255 255 / .3);
  --line: rgb(255 255 255 / .1);
  --line-2: rgb(255 255 255 / .2);
  --line-pill: rgb(255 255 255 / .3);
  --fill: rgb(255 255 255 / .06);
  --fill-2: rgb(255 255 255 / .12);
  --accent: #5553E2;
  --red: #FF4D3D;
  --amber: #F5C542;

  --p0: #FF3B30; --p1: #FF7A45; --p2: #F5C542; --p3: #34C77B; --p4: #4C8DFF;

  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wide: "Roboto Flex", "Inter Tight", system-ui, sans-serif;

  --gutter: 64px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-snap: cubic-bezier(1, 0, 0, 1);
  --ease-reveal: cubic-bezier(.25, 0, .1, 1);
  --dur: 500ms;
}
@media (max-width: 767px) { :root { --gutter: 16px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 16px/24px var(--font); letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100vh; overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.wide { font-family: var(--wide); font-variation-settings: "wdth" 151, "wght" 400; }

/* ── Preloader ─────────────────────────────────────────────────────────── */
.preload {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: grid; place-items: center;
  transition: opacity .6s var(--ease), visibility .6s;
}
.preload.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preload__n { font-family: var(--wide); font-variation-settings: "wdth" 151; font-size: 28px; letter-spacing: -0.02em; }
.preload__mark { width: 56px; height: 56px; margin: 0 auto 18px; opacity: .9; }

/* ── Header ────────────────────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 72px; padding: 0 var(--gutter);
  background: linear-gradient(#000 60%, rgb(0 0 0 / 0));
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; }
.logo svg { width: 22px; height: 22px; }
.logo span { font-family: var(--wide); font-variation-settings: "wdth" 151; text-transform: uppercase; letter-spacing: .02em; }
.nav { display: flex; gap: 36px; }
.nav a { position: relative; font-size: 16px; transition: opacity var(--dur) var(--ease); }
.nav a:hover { opacity: .5; }
.nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: #fff; }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 6px; border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 11px; line-height: 18px; letter-spacing: 0; vertical-align: 2px;
}
.hdr__right { justify-self: end; display: flex; align-items: center; gap: 20px; font-size: 16px; }
.hdr__me { color: var(--fg-2); }
.menu-btn { display: none; }

@media (max-width: 960px) {
  .hdr { grid-template-columns: 1fr auto; }
  .nav, .hdr__me { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; }
}

/* Full-screen menu (mobile) */
.menu {
  position: fixed; inset: 0; z-index: 40; background: #000;
  padding: 96px var(--gutter) 32px; display: flex; flex-direction: column;
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-reveal);
}
.menu.open { clip-path: inset(0 0 0 0); }
.menu a.m {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-family: var(--wide); font-variation-settings: "wdth" 151; text-transform: uppercase;
  font-size: clamp(26px, 8vw, 44px); line-height: 1;
}
.menu a.m.on { color: var(--accent); }
.menu__foot { margin-top: auto; display: flex; justify-content: space-between; color: var(--fg-2); }
.menu__close { position: absolute; top: 24px; right: var(--gutter); }

/* ── Layout ────────────────────────────────────────────────────────────── */
main { padding: 0 var(--gutter) 96px; }
.view { animation: viewin .6s var(--ease-reveal) both; }
@keyframes viewin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 40px 0 32px; flex-wrap: wrap; }
.display {
  margin: 0; font-family: var(--wide); font-variation-settings: "wdth" 151, "wght" 400;
  text-transform: uppercase; font-weight: 400;
  font-size: clamp(40px, 9.4vw, 160px); line-height: .9; letter-spacing: -0.03em;
  overflow: hidden;
}
.display > span { display: inline-block; animation: rise 1s var(--ease-reveal) both; }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
.hero__meta { color: var(--fg-2); font-size: 16px; text-align: right; padding-bottom: 8px; }
.hero__meta b { color: #fff; font-weight: 400; }
@media (max-width: 767px) { .hero { padding: 24px 0 24px; } .hero__meta { text-align: left; padding-bottom: 0; } }
.lead { font-size: 21px; line-height: 32px; color: var(--fg-2); max-width: 640px; }

.h2 {
  margin: 0; font-family: var(--wide); font-variation-settings: "wdth" 151; font-weight: 400;
  font-size: clamp(22px, 2.6vw, 32px); line-height: 1.1; text-transform: uppercase; letter-spacing: -0.01em;
}
.sec { margin-top: 56px; }
.sec__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.sec__head .muted { font-size: 14px; }
.muted { color: var(--fg-3); }
.dim { color: var(--fg-2); }

/* ── Controls ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  background: #fff; color: #000; font-size: 16px; white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), opacity .2s;
}
.btn:hover { background: var(--accent); color: #fff; }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn .arr { font-size: 18px; transition: transform var(--dur) var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn--o { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px var(--line-pill); }
.btn--o:hover { background: #fff; color: #000; }
.btn--red:hover { background: var(--red); color: #fff; }
.btn--sm { height: 36px; padding: 0 16px; font-size: 14px; gap: 10px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-pill); font-size: 14px; white-space: nowrap;
  transition: background .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.chip:hover { box-shadow: inset 0 0 0 1px #fff; }
.chip.on { background: #fff; color: #000; box-shadow: inset 0 0 0 1px #fff; }
.chip .cnt { opacity: .5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips--scroll::-webkit-scrollbar { display: none; }

.field { display: block; position: relative; }
.field__label { display: block; font-size: 14px; color: var(--fg-3); margin-bottom: 4px; }
.input, .textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-pill);
  border-radius: 0; outline: none; padding: 12px 0; font-size: 21px; line-height: 32px;
  transition: border-color .3s var(--ease);
}
.input:focus, .textarea:focus { border-color: #fff; }
.input--xl { font-size: clamp(24px, 3vw, 40px); line-height: 1.2; padding: 14px 0; }
.input--sm { font-size: 16px; line-height: 24px; padding: 8px 0; }
.textarea { resize: vertical; min-height: 96px; font-size: 18px; line-height: 28px; }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
input[type=date].input { color-scheme: dark; min-width: 170px; }
.check { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; font-size: 15px; }
.check input { accent-color: #fff; width: 16px; height: 16px; }

.form { display: grid; gap: 40px; max-width: 920px; }
.form__row { display: grid; gap: 14px; }
.hint { font-size: 14px; color: var(--fg-3); }

/* ── Priority dot ──────────────────────────────────────────────────────── */
.pd { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pd0 { background: var(--p0); box-shadow: 0 0 0 0 rgb(255 59 48 / .6); animation: pulse 1.8s infinite; }
.pd1 { background: var(--p1); } .pd2 { background: var(--p2); } .pd3 { background: var(--p3); } .pd4 { background: var(--p4); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgb(255 59 48 / 0); } 100% { box-shadow: 0 0 0 0 rgb(255 59 48 / 0); } }

/* ── Backlog ───────────────────────────────────────────────────────────── */
.toolbar { display: flex; gap: 16px 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-bottom: 8px; }
.toolbar > .chips--scroll { flex: 1 1 420px; min-width: 0; }
.search { width: 240px; max-width: 100%; flex: none; }
@media (max-width: 767px) { .search { width: 100%; } }
.search .input { font-size: 16px; padding: 6px 0; }

.group { margin-top: 48px; }
.group__head {
  display: flex; align-items: center; gap: 14px; padding: 0 0 14px; border-bottom: 1px solid var(--line-2);
}
.group__name { font-family: var(--wide); font-variation-settings: "wdth" 151; text-transform: uppercase; font-size: clamp(18px, 2vw, 24px); }
.group__n { color: var(--fg-3); font-size: 14px; margin-left: auto; }

.rows { list-style: none; margin: 0; padding: 0; }
.row {
  position: relative; display: grid; align-items: center; gap: 24px;
  grid-template-columns: 40px minmax(0, 1fr) 190px 230px 120px;
  min-height: 72px; padding: 16px 12px; margin: 0 -12px;
  border-bottom: 1px solid var(--line); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  animation: rowin .7s var(--ease-reveal) backwards; animation-delay: calc(var(--i, 0) * 35ms);
}
@keyframes rowin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.row:hover { background: rgb(255 255 255 / .045); }
.row:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.row:hover .row__sec, .row:hover .row__n { opacity: .9; }
.row__n { font-size: 14px; color: inherit; opacity: .35; font-variant-numeric: tabular-nums; transition: opacity var(--dur) var(--ease); }
.row__title { font-size: 19px; line-height: 26px; overflow-wrap: anywhere; }
.row__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.row__sec { font-size: 14px; line-height: 20px; opacity: .55; transition: opacity var(--dur) var(--ease); overflow-wrap: anywhere; }
.row__st { font-size: 14px; opacity: .55; text-align: right; transition: opacity var(--dur) var(--ease); }
/* Drag & drop */
.row { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.no-anim .row { animation: none; }
.row.lifting { transform: scale(.985); background: var(--fill-2); transition: transform .28s var(--ease), background .28s var(--ease); }
.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 70; margin: 0; pointer-events: none;
  background: #121214; color: #fff; animation: none; border-bottom: 0;
  box-shadow: 0 24px 64px rgb(0 0 0 / .8), 0 0 0 1px rgb(85 83 226 / .7);
  will-change: transform;
}
.drag-ghost .row__sec, .drag-ghost .row__n, .drag-ghost .row__st { opacity: .9; }
.drop-ph {
  list-style: none; margin: 0 -12px; border: 1px dashed var(--accent);
  background: rgb(85 83 226 / .14); transition: height .2s var(--ease);
}
@media (max-width: 767px) { .drop-ph { margin: 0 -8px; } }
body.dragging, body.dragging * { cursor: grabbing !important; }
body.dragging .row:hover { background: none; color: inherit; }
body.dragging .row:hover .row__sec, body.dragging .row:hover .row__n { opacity: .55; }
/* Empty priorities appear only while dragging (scroll is compensated in JS) */
.group--empty { display: none; }
body.dragging .group--empty { display: block; }
.drop-empty { padding: 20px 0; color: var(--fg-3); font-size: 14px; border-bottom: 1px dashed var(--line-2); }
.rows:not(:empty) + .drop-empty { display: none; }
.dnd-hint { margin-top: 4px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; line-height: 22px; box-shadow: inset 0 0 0 1px var(--line-pill); white-space: nowrap;
}
.tag--acc { background: var(--accent); color: #fff; box-shadow: none; }
.tag--red { background: var(--red); color: #fff; box-shadow: none; }

.dl { display: inline-flex; align-items: center; gap: 8px; }
.dl--over { color: var(--red); opacity: 1 !important; }
.dl--today { color: var(--amber); opacity: 1 !important; }
.dl small { opacity: .6; font-size: 12px; }

@media (max-width: 1100px) {
  .row { grid-template-columns: 32px minmax(0, 1fr) 170px 180px; }
  .row__st { display: none; }
}
@media (max-width: 767px) {
  .row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 8px; margin: 0 -8px; min-height: 0; }
  .row__n { display: none; }
  .row__title { grid-column: 1 / -1; font-size: 17px; line-height: 24px; }
  .row__sec { font-size: 13px; }
  .row__asg { text-align: right; }
}

.empty { padding: 64px 0; color: var(--fg-3); font-size: 21px; line-height: 32px; }
.empty .wide { display: block; color: #fff; font-size: clamp(28px, 4vw, 48px); line-height: 1; text-transform: uppercase; margin-bottom: 16px; }

/* Daily ack banner — the one full-bleed accent block, as on format-3 */
.ack {
  margin: 8px calc(var(--gutter) * -1) 0; padding: 32px var(--gutter);
  background: var(--accent); display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.ack__t { font-family: var(--wide); font-variation-settings: "wdth" 151; text-transform: uppercase; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.1; }
.ack__s { margin-top: 6px; opacity: .8; }
.ack .btn:hover { background: #000; color: #fff; }

/* ── Drawer ────────────────────────────────────────────────────────────── */
.scrim {
  position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s;
}
.scrim.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 51;
  width: min(640px, 100vw); background: #000; border-left: 1px solid var(--line-2);
  transform: translateX(100%); transition: transform .7s var(--ease-reveal);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 32px; border-bottom: 1px solid var(--line); flex: none; }
.drawer__body { overflow-y: auto; padding: 32px 32px 48px; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.drawer__foot { flex: none; padding: 20px 32px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 767px) {
  .drawer__top, .drawer__body, .drawer__foot { padding-left: 16px; padding-right: 16px; }
}
.x { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-pill); transition: background .3s, color .3s; font-size: 18px; }
.x:hover { background: #fff; color: #000; }
.x:disabled { opacity: .25; pointer-events: none; }
.chip:disabled { opacity: .5; pointer-events: none; }

.t-title {
  font-family: var(--wide); font-variation-settings: "wdth" 125; font-weight: 400;
  font-size: clamp(24px, 3vw, 32px); line-height: 1.15; margin: 0 0 24px; overflow-wrap: anywhere;
}
.t-title[contenteditable="true"] { outline: none; border-bottom: 1px solid #fff; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.kv__k { color: var(--fg-3); font-size: 14px; padding-top: 4px; }
.kv__v { min-width: 0; }
@media (max-width: 767px) { .kv { grid-template-columns: 1fr; gap: 8px; } .kv__k { padding: 0; } }
.note { padding: 14px 16px; background: var(--fill); border-radius: 0; font-size: 14px; line-height: 20px; margin: 16px 0; border-left: 2px solid var(--accent); }
.note--red { border-left-color: var(--red); }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 17px; line-height: 26px; color: rgb(255 255 255 / .85); }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.timeline li { padding: 6px 0; color: var(--fg-2); }
.timeline li s { color: var(--fg-3); }
.img-prev { margin-top: 10px; max-height: 320px; object-fit: contain; background: var(--fill); cursor: zoom-in; }
.inline-form { display: grid; gap: 12px; margin-top: 12px; padding: 16px; background: var(--fill); }
.ord { display: inline-flex; align-items: center; gap: 10px; }
.ord .x { width: 32px; height: 32px; font-size: 14px; }

/* ── Cards (inbox) ─────────────────────────────────────────────────────── */
.cards { display: grid; gap: 0; }
.card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: start;
  padding: 28px 0; border-bottom: 1px solid var(--line);
  animation: rowin .7s var(--ease-reveal) both; animation-delay: calc(var(--i, 0) * 50ms);
}
.card__kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.card__title { font-size: 21px; line-height: 30px; cursor: pointer; overflow-wrap: anywhere; }
.card__title:hover { opacity: .6; }
.card__meta { margin-top: 8px; color: var(--fg-2); font-size: 15px; line-height: 22px; }
.card__meta b { color: #fff; font-weight: 400; }
.card__acts { display: grid; gap: 10px; justify-items: end; }
@media (max-width: 767px) { .card { grid-template-columns: 1fr; } .card__acts { justify-items: start; } }
.countdown { font-family: var(--wide); font-variation-settings: "wdth" 151; font-size: 24px; line-height: 1; }
.countdown.over { color: var(--red); }

/* ── Numbers / stats ───────────────────────────────────────────────────── */
.big { font-family: var(--wide); font-variation-settings: "wdth" 151; font-size: clamp(56px, 11vw, 176px); line-height: .9; letter-spacing: -0.04em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--line-2); }
.stat { padding: 28px 24px 28px 0; border-bottom: 1px solid var(--line); }
.stat__n { font-family: var(--wide); font-variation-settings: "wdth" 151; font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.stat__l { margin-top: 10px; color: var(--fg-3); font-size: 14px; }
.bar { height: 2px; background: var(--line); margin-top: 10px; }
.bar > i { display: block; height: 100%; background: #fff; transform-origin: left; animation: grow 1.2s var(--ease-reveal) both; }
@keyframes grow { from { transform: scaleX(0); } }

.table { width: 100%; }
.trow {
  display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1fr 80px; gap: 16px; align-items: center;
  padding: 20px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  animation: rowin .7s var(--ease-reveal) backwards; animation-delay: calc(var(--i, 0) * 35ms);
}
.trow:hover { background: rgb(255 255 255 / .045); }
.trow--static { cursor: default; }
.trow--static:hover { background: none; color: inherit; }
.trow--static:hover .dim { color: var(--fg-2); }
.trow--h { cursor: default; color: var(--fg-3); font-size: 14px; padding-top: 0; animation: none; }
.trow--h:hover { background: none; color: var(--fg-3); }
.num { font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 767px) { .trow { grid-template-columns: minmax(0, 1fr) auto auto; } .trow > :nth-child(2) { display: none; } }

.fine { display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.fine__amt { font-family: var(--wide); font-variation-settings: "wdth" 151; font-size: 20px; text-align: right; }
.fine__amt.neg { color: var(--p3); }
@media (max-width: 767px) { .fine { grid-template-columns: 1fr auto; } .fine > :first-child { grid-column: 1 / -1; font-size: 13px; color: var(--fg-3); } }

.rules { margin-top: 96px; padding-top: 24px; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; color: var(--fg-2); font-size: 14px; line-height: 20px; }
.rules b { display: block; color: #fff; font-weight: 400; font-family: var(--wide); font-variation-settings: "wdth" 151; font-size: 22px; margin-bottom: 6px; }

/* ── Login ─────────────────────────────────────────────────────────────── */
.login { min-height: calc(100vh - 72px); display: grid; grid-template-rows: 1fr auto; padding-bottom: 48px; }
.login__display {
  align-self: center; margin: 0; text-align: center; overflow: hidden;
  font-family: var(--wide); font-variation-settings: "wdth" 151; text-transform: uppercase; font-weight: 400;
  font-size: clamp(52px, 15.5vw, 260px); line-height: .9; letter-spacing: -0.04em;
}
.login__display span { display: inline-block; animation: rise 1.1s var(--ease-reveal) both; }
.login__row { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 520px); justify-content: space-between; gap: 40px; align-items: end; }
.login__lead { font-size: 21px; line-height: 32px; margin: 0 0 6px; }
.login__form { display: flex; align-items: center; border-bottom: 1px solid #fff; height: 64px; }
.login__form input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 21px; height: 100%; }
.login__form input::placeholder { color: var(--dim); }
.login__form button { font-size: 24px; width: 48px; height: 48px; border-radius: 50%; transition: background .3s, color .3s; }
.login__form button:hover { background: #fff; color: #000; }
.login__msg { min-height: 24px; margin-top: 12px; font-size: 14px; color: var(--fg-2); }
.login__msg.err { color: var(--red); }
@media (max-width: 767px) { .login__row { grid-template-columns: 1fr; } }

.linkpage { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.linkpage .display-sm { font-family: var(--wide); font-variation-settings: "wdth" 151; font-size: 40px; margin: 0 0 32px; }

/* ── Footer, toast ─────────────────────────────────────────────────────── */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 32px var(--gutter); border-top: 1px solid var(--line); color: var(--fg-3); font-size: 14px; }
.foot a:hover { color: #fff; }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: calc(100% - 32px); }
.toast {
  background: #fff; color: #000; border-radius: 999px; padding: 12px 22px; font-size: 15px; max-width: 560px;
  animation: toast .5s var(--ease-reveal) both; text-align: center;
}
.toast.err { background: var(--red); color: #fff; }
.toast.out { animation: toastout .4s var(--ease) both; }
@keyframes toast { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastout { to { opacity: 0; transform: translateY(8px); } }

.lightbox { position: fixed; inset: 0; z-index: 80; background: rgb(0 0 0 / .92); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-height: 90vh; max-width: 92vw; object-fit: contain; }

.spin { display: inline-block; width: 14px; height: 14px; border: 1px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ── Selection, context menu, bulk bar ─────────────────────────────────── */
.row.sel { background: rgb(85 83 226 / .13); box-shadow: inset 2px 0 0 var(--accent); }
.row.sel .row__sec, .row.sel .row__n { opacity: .85; }
.row.sel:hover { background: rgb(85 83 226 / .19); }
.tag--st { display: none; }
.tag--work { background: var(--accent); color: #fff; box-shadow: none; }
@media (max-width: 1100px) { .tag--st { display: inline-flex; } }

.ctx {
  position: fixed; z-index: 85; width: 340px; max-width: calc(100vw - 16px);
  background: #0b0b0b; border: 1px solid var(--line-2); padding: 6px 0;
  box-shadow: 0 24px 64px rgb(0 0 0 / .75); animation: ctxin .18s var(--ease) both;
}
@keyframes ctxin { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.ctx__head { padding: 8px 16px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx__i { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; text-align: left; padding: 10px 16px; font-size: 15px; transition: background .2s var(--ease), color .2s var(--ease); }
.ctx__i span { color: var(--fg-3); font-size: 12px; }
.ctx__i:hover { background: rgb(255 255 255 / .07); }
.ctx__i:disabled { opacity: .35; pointer-events: none; }
.ctx__i--red:hover { background: var(--red); color: #fff; }
.ctx__sep { height: 1px; background: var(--line); margin: 6px 0; }
.ctx__lbl { padding: 6px 16px 2px; font-size: 12px; color: var(--fg-3); }
.ctx__row { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 16px 8px; }
.ctx__row .chip { height: 28px; padding: 0 10px; font-size: 13px; gap: 6px; }

.selbar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 20px; white-space: nowrap;
  background: #0b0b0b; border: 1px solid var(--line-2); border-radius: 999px;
  box-shadow: 0 16px 48px rgb(0 0 0 / .65); color: var(--fg-2); font-size: 14px;
  animation: selin .45s var(--ease-reveal) both;
}
@keyframes selin { from { opacity: 0; transform: translate(-50%, 16px); } }
.selbar b { color: #fff; font-weight: 400; margin-right: 8px; }
.selbar .x { width: 36px; height: 36px; font-size: 14px; }
@media (max-width: 767px) { .selbar { left: 8px; right: 8px; transform: none; overflow-x: auto; animation: none; } }

.modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal__box { width: min(520px, 100%); display: grid; gap: 20px; padding: 28px; background: #000; border: 1px solid var(--line-2); animation: toast .4s var(--ease-reveal) both; }

/* «Только в работе» switch */
.worktoggle { display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 14px 0 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-pill); font-size: 14px; white-space: nowrap; flex: none; transition: box-shadow .3s var(--ease), background .3s var(--ease); }
.worktoggle:hover { box-shadow: inset 0 0 0 1px #fff; }
.worktoggle .cnt { opacity: .5; }
.worktoggle__sw { position: relative; width: 28px; height: 16px; border-radius: 8px; background: var(--line-2); transition: background .3s var(--ease); }
.worktoggle__sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.worktoggle.on { background: rgb(85 83 226 / .18); box-shadow: inset 0 0 0 1px var(--accent); }
.worktoggle.on .worktoggle__sw { background: var(--accent); }
.worktoggle.on .worktoggle__sw::after { transform: translateX(12px); }

/* ── Subtasks ──────────────────────────────────────────────────────────── */
.kv__k .cnt { opacity: .7; margin-left: 4px; }
.subs__bar { height: 2px; background: var(--line); }
.subs__bar > i { display: block; height: 100%; background: var(--accent); transition: width .5s var(--ease); }
.subs { list-style: none; margin: 0; padding: 0; }
.sub { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sub__chk {
  width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-pill);
  display: grid; place-items: center; font-size: 12px; line-height: 1; color: #fff;
  transition: background .25s var(--ease), box-shadow .25s var(--ease);
}
.sub__chk:hover { box-shadow: inset 0 0 0 1px #fff; }
.sub.done .sub__chk { background: var(--accent); box-shadow: none; }
.sub__chk:disabled { pointer-events: none; }
.sub__t { font-size: 15px; line-height: 22px; overflow-wrap: anywhere; cursor: text; }
.sub.done .sub__t { color: var(--fg-3); text-decoration: line-through; text-decoration-color: var(--dim); }
.sub__in { padding: 2px 0; font-size: 15px; }
.sub__asg {
  max-width: 150px; height: 28px; padding: 0 8px; border-radius: 999px; font-size: 12px;
  background: transparent; border: 0; box-shadow: inset 0 0 0 1px var(--line); color: var(--fg-2); cursor: pointer;
  appearance: none; -webkit-appearance: none; text-overflow: ellipsis;
}
.sub__asg:hover, .sub__asg:focus { box-shadow: inset 0 0 0 1px var(--line-pill); color: #fff; outline: none; }
.sub__asg option { background: #111; color: #fff; }
.sub__who { font-size: 12px; }
.sub__x { width: 24px; height: 24px; border-radius: 50%; font-size: 11px; color: var(--fg-3); opacity: 0; transition: opacity .2s, color .2s, background .2s; }
.sub:hover .sub__x, .sub__x:focus { opacity: 1; }
.sub__x:hover { color: #fff; background: var(--red); }
@media (hover: none) { .sub__x { opacity: .6; } }
.sub-add { margin-top: 6px; }
.sub-add .input { font-size: 15px; }
.tag--sub { font-variant-numeric: tabular-nums; }
.tag--subdone { color: var(--p3); box-shadow: inset 0 0 0 1px rgb(52 199 123 / .5); }
