/* Tremplin: the same family as Dufour Mail, Drive and Bubule (Nunito, lavender, round cards, gradient buttons). */
@font-face{font-family:Nunito;font-style:normal;font-weight:400 800;font-display:swap;src:url(fonts/nunito-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Nunito;font-style:normal;font-weight:400 800;font-display:swap;src:url(fonts/nunito-latin.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}
:root{
  --bg:#f7f8ff;--rail:#eef0fb;--ink:#1d2045;--ink2:#41456b;--mute:#62678f;--hair:#e7e9f6;--card:#ffffff;--tile:#eceefb;
  --accent:#6c5cff;--green:#17845a;--amber:#a86a00;--red:#d1334f;--blue:#3f6fe8;
  --amberbg:#fff3dc;--greenbg:#e3f6ec;--redbg:#ffe6ea;--bluebg:#e8eeff;
  --grad:linear-gradient(135deg,#7b6cff 0%,#5a8dff 48%,#3cc8f0 100%);
  --shadow:0 14px 38px rgba(76,70,180,.16),0 3px 8px rgba(76,70,180,.08);
  --soft:0 6px 20px rgba(76,70,180,.08),0 1px 3px rgba(76,70,180,.06);
  --f:Nunito,system-ui,-apple-system,"Segoe UI",sans-serif;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0f1129;--rail:#171a37;--ink:#eef0ff;--ink2:#c9cbea;--mute:#a2a6cc;--hair:#262a52;--card:#1b1e3e;--tile:#242852;
  --green:#3cc98d;--amber:#e6a73a;--red:#ff6b85;--blue:#7a9cff;--amberbg:#3a2e14;--greenbg:#143326;--redbg:#3d1822;--bluebg:#1f2a55;
  --shadow:0 16px 40px rgba(0,0,0,.5);--soft:0 6px 20px rgba(0,0,0,.3);color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0f1129;--rail:#171a37;--ink:#eef0ff;--ink2:#c9cbea;--mute:#a2a6cc;--hair:#262a52;--card:#1b1e3e;--tile:#242852;
  --green:#3cc98d;--amber:#e6a73a;--red:#ff6b85;--blue:#7a9cff;--amberbg:#3a2e14;--greenbg:#143326;--redbg:#3d1822;--bluebg:#1f2a55;
  --shadow:0 16px 40px rgba(0,0,0,.5);--soft:0 6px 20px rgba(0,0,0,.3);color-scheme:dark}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
.defs{position:absolute;width:0;height:0}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
html,body{height:100%;margin:0}
body{font:15px/1.45 var(--f);color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--accent)}
svg{width:20px;height:20px;flex:none}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:10px}
h1,h2,h3{margin:0;letter-spacing:-.02em}

.primary{border:0;background:var(--grad);color:#fff;border-radius:999px;padding:10px 18px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;white-space:nowrap;box-shadow:0 6px 18px rgba(108,92,255,.3);min-height:44px}
.primary:disabled{opacity:.55;cursor:default}
.primary.big{padding:13px 22px;font-size:16px}
.pill{border:1px solid var(--hair);background:var(--card);border-radius:999px;padding:9px 15px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px;color:var(--ink);text-decoration:none;min-height:40px}
.pill:hover{border-color:var(--accent)}
.pill.on{background:var(--ink);color:var(--card);border-color:var(--ink)}
.pill.danger{color:var(--red)}
.pill:disabled{opacity:.5;cursor:default}
.wide{width:100%}
.icon{width:40px;height:40px;border:0;background:transparent;border-radius:50%;display:grid;place-items:center;color:var(--ink2)}
.icon:hover{background:var(--tile)}

/* sign in */
.signin{min-height:100%;display:grid;place-items:center;padding:24px 16px}
.scard{background:var(--card);border-radius:28px;box-shadow:var(--shadow);padding:34px 28px;width:min(400px,100%);text-align:center;display:flex;flex-direction:column;gap:12px}
.slogo{width:64px;height:64px;border-radius:20px;background:var(--grad);color:#fff;display:grid;place-items:center;margin:0 auto 2px}
.slogo svg{width:34px;height:34px}
.scard h1{font-size:28px}
.scard p{color:var(--mute);margin:0 0 8px}
.err{color:var(--red)!important;font-weight:700}

/* shell: rail on a computer, tabs at the bottom on a phone */
.app{display:flex;min-height:100%}
.rail{width:230px;flex:none;background:var(--rail);padding:20px 12px;display:flex;flex-direction:column;gap:3px;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:19px;padding:4px 10px 18px}
.brand i{width:34px;height:34px;border-radius:11px;background:var(--grad);color:#fff;display:grid;place-items:center}
.nav{border:0;background:transparent;border-radius:12px;min-height:44px;padding:0 12px;display:flex;align-items:center;gap:12px;color:var(--ink2);font-weight:700;text-align:left}
.nav:hover{background:var(--card)}
.nav.on{background:var(--card);color:var(--accent);box-shadow:var(--soft)}
.railfoot{margin-top:auto;font-size:12.5px;color:var(--mute);padding:10px;display:flex;flex-direction:column;gap:6px}
.railfoot button{border:0;background:none;color:var(--mute);padding:0;text-align:left;font-weight:700;font-size:12.5px}
.work{flex:1;min-width:0;padding:32px clamp(16px,3vw,40px) 60px;max-width:1240px}
.tabs{display:none}
@media (max-width:760px){
  .rail{display:none}
  .work{padding:calc(env(safe-area-inset-top,0px) + 22px) 16px calc(env(safe-area-inset-bottom,0px) + 100px)}
  .tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;background:var(--card);border-top:1px solid var(--hair);padding:6px 0 calc(env(safe-area-inset-bottom,0px) + 6px);z-index:5}
  .tab{border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;font-weight:700;color:var(--mute);min-height:48px;justify-content:center}
  .tab.on{color:var(--accent)}
  .tab svg{width:22px;height:22px}
}

/* page parts */
.head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:20px}
.head h1{font-size:28px}
.sub{color:var(--mute);font-size:14px;margin:2px 0 0}
.card{background:var(--card);border-radius:20px;box-shadow:var(--soft);padding:16px}
.stack{display:flex;flex-direction:column;gap:12px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.grow{flex:1;min-width:0}
.section{margin:26px 0 10px;font-size:13px;font-weight:800;color:var(--mute);text-transform:uppercase;letter-spacing:.05em}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stat{background:var(--card);border-radius:18px;padding:14px;box-shadow:var(--soft)}
.stat b{display:block;font-size:26px;line-height:1.1}
.stat span{font-size:12.5px;color:var(--mute);font-weight:700}
.item{display:flex;gap:12px;align-items:center;background:var(--card);border-radius:18px;padding:13px 14px;box-shadow:var(--soft);border:0;text-align:left;width:100%}
button.item:hover{outline:1.5px solid var(--accent)}
.badge{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;font-weight:800;font-size:13px;flex:none;background:var(--tile);color:var(--ink2)}
.badge.amber{background:var(--amberbg);color:var(--amber)}.badge.blue{background:var(--bluebg);color:var(--blue)}.badge.red{background:var(--redbg);color:var(--red)}.badge.green{background:var(--greenbg);color:var(--green)}
.t1{font-weight:800}
.t2{font-size:13px;color:var(--mute)}
.chip{font-size:12px;font-weight:700;padding:3px 9px;border-radius:999px;background:var(--tile);color:var(--ink2);display:inline-block}
.chip.ok{background:var(--greenbg);color:var(--green)}.chip.miss{background:var(--amberbg);color:var(--amber)}.chip.red{background:var(--redbg);color:var(--red)}.chip.blue{background:var(--bluebg);color:var(--blue)}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.ring{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;font-weight:800;flex:none;background:conic-gradient(var(--accent) calc(var(--v)*1%),var(--tile) 0)}
.ring span{width:38px;height:38px;border-radius:50%;background:var(--card);display:grid;place-items:center;font-size:13px}
.note{font-size:13px;color:var(--mute);margin:0}
.empty{color:var(--mute);text-align:center;padding:28px 12px}
.alert{background:var(--amberbg);color:var(--amber);border-radius:16px;padding:12px 14px;font-weight:700;font-size:14px}

/* forms */
label.f{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:800;color:var(--ink2)}
.in,textarea.in,select.in{border:1px solid var(--hair);background:var(--bg);border-radius:14px;padding:10px 13px;width:100%;outline:0;font-weight:500;font-size:15px}
.in:focus{border-color:var(--accent)}
textarea.in{min-height:90px;resize:vertical;line-height:1.5}
textarea.doc{min-height:320px;font-size:14px}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (max-width:560px){.grid2{grid-template-columns:1fr}.stats{gap:8px}.stat b{font-size:22px}}

/* board: columns on a computer, one list per stage on a phone */
.board{overflow-x:auto;padding-bottom:6px}
.cols{display:grid;grid-template-columns:repeat(7,minmax(190px,1fr));gap:12px;min-width:1400px}
.col{background:var(--rail);border-radius:18px;padding:10px;display:flex;flex-direction:column;gap:8px;min-height:120px}
.col h2{font-size:13.5px;color:var(--ink2);padding:4px 6px}
.col.drop{outline:2px dashed var(--accent)}
.kcard{background:var(--card);border-radius:14px;padding:11px 12px;border:0;text-align:left;display:flex;flex-direction:column;gap:3px;box-shadow:var(--soft);cursor:grab}
.kcard:hover{outline:1.5px solid var(--accent)}
@media (max-width:760px){.cols{display:flex;flex-direction:column;min-width:0}.col{min-height:0}.kcard{cursor:pointer}}

/* sheet */
dialog{border:0;padding:0;background:transparent;max-width:none;max-height:none;width:100%;height:100%;margin:0}
dialog::backdrop{background:rgba(15,17,41,.38)}
.sheet{background:var(--bg);width:min(760px,100%);max-height:calc(100% - 40px);margin:20px auto;border-radius:26px;box-shadow:var(--shadow);overflow:auto;padding:22px clamp(16px,3vw,28px) 28px;display:flex;flex-direction:column;gap:14px}
.sheet .top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.sheet h2{font-size:23px}
@media (max-width:760px){.sheet{margin:0;max-height:100%;height:100%;border-radius:0;padding-top:calc(env(safe-area-inset-top,0px) + 16px);padding-bottom:calc(env(safe-area-inset-bottom,0px) + 24px)}}
.steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.steps i{height:6px;border-radius:3px;background:var(--hair)}
.steps i.on{background:var(--accent)}
.tl{display:flex;flex-direction:column;gap:9px;margin:0;padding:0;list-style:none}
.tl li{display:flex;gap:10px;font-size:14px}
.tl li::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--accent);margin-top:7px;flex:none}
.prep{white-space:pre-wrap;font-size:14px;line-height:1.55}
.toast{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 90px);transform:translateX(-50%);background:var(--ink);color:var(--card);padding:11px 18px;border-radius:999px;font-weight:700;z-index:20;box-shadow:var(--shadow);max-width:calc(100% - 32px)}
.toast.err{background:var(--red);color:#fff}
.busy{opacity:.6;pointer-events:none}
@media print{
  body *{visibility:hidden}
  #printArea,#printArea *{visibility:visible}
  #printArea{position:absolute;inset:0;white-space:pre-wrap;font:11pt/1.45 Georgia,serif;color:#000;background:#fff;padding:0}
}
.row .in.grow{min-width:200px}
