/* My Time. A white ground, black type, one grotesque, and pure colour only where the work is - after MoMA's own
   identity and its design store. No borders, no boxes, no shadows, no rounded corners: space and weight do the work. */
@font-face { font-family: "Franklin"; src: url("/static/fonts/LibreFranklin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --ink: #000; --soft: #767676; --faint: #f3f3f3; --ground: #fff;
  --red: #e4002b; --blue: #0047bb; --yellow: #ffd100; --black: #111; --green: #00965e; --orange: #ff6a13; --pink: #ff5cb8; --violet: #6c3fd1;
  --alert: #e4002b; --gut: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }       /* the hidden attribute always wins over a display rule */
html, body { margin: 0; background: var(--ground); color: var(--ink); }
body { font: 400 15px/1.45 "Franklin", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 1.05; }
h2 { font-size: 34px; margin: 0 0 18px; }
h3 { font-size: 19px; margin: 0 0 8px; }
.soft { color: var(--soft); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* top: the name, then the views */
header { display: flex; align-items: baseline; gap: 28px; padding: 22px var(--gut) 10px; max-width: 1400px; margin: 0 auto; flex-wrap: wrap; }
.mark { font-weight: 900; font-size: 26px; letter-spacing: -0.04em; text-decoration: none; white-space: nowrap; }
nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
nav::-webkit-scrollbar { display: none; }
nav a { text-decoration: none; font-weight: 700; color: var(--soft); white-space: nowrap; padding: 4px 0; }
nav a.on, nav a:hover { color: var(--ink); }
.who { font-size: 13px; color: var(--soft); white-space: nowrap; }
.who a { text-decoration: none; margin-left: 10px; color: var(--ink); font-weight: 700; }
main { max-width: 1400px; margin: 0 auto; padding: 18px var(--gut) 120px; }
@media (max-width: 700px) {
  header { gap: 6px 18px; padding-top: 16px; }
  .mark { font-size: 22px; }
  nav { order: 3; flex-basis: 100%; gap: 18px; }
  h2 { font-size: 28px; }
}

/* buttons: solid black, or just words */
.btn { background: var(--ink); color: #fff; border: 0; padding: 10px 18px; font-weight: 700; cursor: pointer; border-radius: 0; text-decoration: none; display: inline-block; }
.btn:active { transform: translateY(1px); }
.btn.go { background: var(--green); } .btn.stop { background: var(--red); } .btn.pause { background: var(--yellow); color: #000; }
.lnk { background: none; border: 0; padding: 4px 0; cursor: pointer; font-weight: 700; color: var(--ink); }
.lnk:hover { text-decoration: underline; text-underline-offset: 3px; }
.lnk.soft { color: var(--soft); font-weight: 400; }
.lnk.danger { color: var(--red); }
input, select, textarea { background: var(--faint); border: 0; border-radius: 0; padding: 10px 12px; width: 100%; outline: none; min-width: 0; }
input:focus, select:focus, textarea:focus { background: #e9e9e9; }
input[type="date"] { -webkit-appearance: none; appearance: none; min-height: 42px; }
label.f { display: block; font-size: 12px; font-weight: 700; color: var(--soft); margin: 0 0 4px; }

.msg { margin: 0 0 14px; font-weight: 600; min-height: 1.45em; }
.msg.err { color: var(--alert); }
.msg button { margin-left: 10px; }

/* ---------------- Week and Month+: a pile per column, top down, height = time ---------------- */
.gnav { display: flex; align-items: baseline; gap: 16px; margin: 0 0 14px; flex-wrap: wrap; }
.gnav .arrow { font-size: 26px; line-height: 1; padding: 0 6px; }
.gnav b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; min-width: 12ch; }
.splitbar { font-weight: 600; }
.pwrap { overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut); }
.pwrap::-webkit-scrollbar { display: none; }
.pwrap.nosnap { scroll-snap-type: none; }      /* while a block is held: no snapping back as the edge scrolls */
.pgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: start; min-width: 0; }
@media (max-width: 700px) { .pgrid { grid-template-columns: repeat(7, 46vw); } .pcol { scroll-snap-align: start; } }
.pcol { min-width: 0; cursor: pointer; }
.ph { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph span { display: block; font-weight: 400; font-size: 13px; color: var(--soft); }
.pcol.past .ph { color: var(--soft); }
.pcol.today .ph::after { content: ""; display: block; width: 18px; height: 4px; background: var(--red); margin-top: 4px; }
.pcol .flag { font-size: 12px; font-weight: 700; min-height: 18px; padding-top: 2px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcol.blocked .flag { color: var(--ink); }
.pbox { position: relative; display: flex; flex-direction: column; margin-top: 6px; background: var(--ground); }
.pbox .avail { position: absolute; left: 0; right: 0; top: 0; background: var(--faint); z-index: 0; }
.pcol.blocked .pbox .avail { background: repeating-linear-gradient(-45deg, var(--faint) 0 6px, #fff 6px 12px); }
.pcol.open .pbox .avail { background: #e8e8e8; }
.pcol.drop .pbox .avail { background: #dcdcdc; }
.pcol.dragfrom { opacity: .6; }
.pb { position: relative; z-index: 1; flex: none; width: 100%; overflow: hidden; color: #fff; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; box-shadow: inset 0 -2px 0 var(--ground); }
.pb.drag { cursor: grab; }
.pb { touch-action: none; }          /* the page handles a finger on a block: hold = pick up, move = scroll (app.js) */
.pb .t1 { display: block; font-weight: 700; font-size: 13px; padding: 4px 7px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.pb .t2 { display: block; font-size: 12px; padding: 0 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.pb.dark { color: #000; }
.pb.logged { background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 2px, transparent 2px 7px); }
.pb.moved .t1::after { content: " ↷"; }
.pb.sel { outline: 3px solid var(--ink); outline-offset: -3px; z-index: 2; }
.pb.open .t2 { white-space: normal; }
.pb.open .t3 { display: block; font-size: 12px; padding: 2px 7px 6px; line-height: 1.3; }
.pb .t3 { display: none; }
.splitline { flex: none; height: 0; position: relative; z-index: 3; }
.splitline i { position: absolute; left: -8px; right: -8px; top: -9px; height: 18px; cursor: ns-resize; touch-action: none; background: linear-gradient(transparent 7px, var(--ink) 7px 11px, transparent 11px); }
.ptot { font-size: 13px; margin-top: 8px; display: flex; justify-content: space-between; gap: 4px; }
.ptot b { font-weight: 800; }
.ptot .over { color: var(--alert); font-weight: 800; }
#ghost { position: fixed; z-index: 1000; pointer-events: none; padding: 8px 12px; font-weight: 700; color: #fff; }
#ghost.dark { color: #000; }
.conf { color: var(--alert); font-weight: 600; margin: 0 0 12px; }
.conf div { margin: 2px 0; }
.ok { color: var(--soft); margin: 0 0 12px; }

/* below the piles */
.below { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 36px; margin-top: 40px; }
.list { display: grid; gap: 8px; }
.row { display: flex; gap: 12px; align-items: baseline; }
.row .dot { width: 12px; height: 12px; flex: none; transform: translateY(1px); }
.row .grow { flex: 1; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 18px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; display: inline-block; }

/* the item box (Emily's job box): what it is, its time, edited in place */
.ibox { background: var(--faint); padding: 18px; margin-top: 24px; }
.ibox .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 12px 0; }
.ibox .stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }

/* ---------------- Work: the inputs ---------------- */
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px 40px; }
.sec h3 { font-size: 24px; display: flex; align-items: baseline; gap: 10px; }
.sec h3 .n { font-size: 14px; color: var(--soft); font-weight: 700; }
.sec p.lead { color: var(--soft); margin: 0 0 14px; }
.item { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; cursor: pointer; }
.item .sw { width: 14px; height: 14px; flex: none; transform: translateY(2px); }
.item .nm { flex: 1; min-width: 0; font-weight: 700; }
.item .nm span { display: block; font-weight: 400; color: var(--soft); font-size: 13px; }
.item .tm { font-weight: 800; white-space: nowrap; }
.item.done .nm { text-decoration: line-through; color: var(--soft); }
.form { background: var(--faint); padding: 16px; margin: 6px 0 12px; }
.form input, .form select { background: #fff; }
.form .g { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form .g .full { grid-column: 1 / -1; }
.form .acts { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border: 0; padding: 0; cursor: pointer; }
.swatches button.on { outline: 3px solid var(--ink); outline-offset: 2px; }
.ferr { color: var(--alert); font-weight: 600; margin-top: 10px; min-height: 1em; }
.hours { display: grid; gap: 4px; max-width: 440px; }
.hours .d { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 6px 0; }
.hours .d b { font-weight: 800; min-width: 5ch; text-align: right; }
.hours .d button { width: 40px; height: 40px; background: var(--faint); border: 0; font-size: 20px; font-weight: 700; cursor: pointer; }
.hours .tot { padding-top: 10px; font-weight: 700; }

/* ---------------- Timer (from Emily's tracker) ---------------- */
.timers { display: grid; gap: 4px; max-width: 760px; }
.tcard { padding: 14px 0 16px; }
.tcard .top { display: flex; gap: 12px; align-items: baseline; }
.tcard .nm { flex: 1; min-width: 0; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.tcard .nm span { display: block; font-weight: 400; font-size: 13px; color: var(--soft); letter-spacing: 0; }
.tcard .acts { display: flex; gap: 10px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.tcard.on { background: var(--faint); padding-left: 14px; padding-right: 14px; }
.clock { font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tslot { width: 120px; text-align: right; flex: none; }
.hist { margin-top: 12px; }
.ent { padding: 8px 0; display: flex; gap: 12px; align-items: baseline; }
.ent .grow { flex: 1; min-width: 0; }
.ed { background: var(--faint); padding: 14px; margin: 6px 0; }
.ed input { background: #fff; }
.ed .g { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin-bottom: 10px; }
.ed .pz { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 8px; align-items: center; margin-bottom: 6px; }
input[type="datetime-local"] { -webkit-appearance: none; appearance: none; min-height: 42px; font-size: 15px; }
@media (max-width: 520px) { .ed .g, .form .g { grid-template-columns: minmax(0,1fr); } .tslot { width: 96px; } }
.bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--ink); color: #fff; padding: 12px var(--gut) calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; z-index: 50; }
.bar .grow { flex: 1; min-width: 0; }
.bar .what { font-size: 13px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .btn { background: #fff; color: #000; }
.bar .btn.stop { background: var(--red); color: #fff; }
.alert { color: var(--alert); font-weight: 700; margin: 0 0 14px; }
.sync { font-size: 12px; color: var(--soft); }
.sync.off { color: var(--alert); }

/* ---------------- Insights ---------------- */
.recs { display: grid; gap: 22px; max-width: 760px; }
.rec .big { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.rec .big .up { color: var(--red); } .rec .big .down { color: var(--blue); }
table.t { border-collapse: collapse; width: 100%; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--soft); font-weight: 700; padding: 6px 12px 6px 0; }
table.t td { padding: 7px 12px 7px 0; vertical-align: baseline; }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr:nth-child(even) td { background: linear-gradient(var(--faint), var(--faint)); }
.over { color: var(--alert); }
.empty { color: var(--soft); padding: 18px 0; }
