/* Layout + components. Tokens live in brand.css. Square corners (0–2px), no resting shadows, no pills. */

.topbar { height: 5px; background: var(--navy); }

/* Admin "View as client" banner, with a real button back */
.preview-bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  background: var(--navy); color: var(--cream); padding: 10px 16px;
  font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
}
.preview-bar .btn { background: var(--cream); color: var(--navy); border-color: var(--cream); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 700px) { .wrap { padding: 0 16px; } }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brandmark { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brandmark .palm { width: 38px; height: 38px; color: var(--accent); }
.brandmark span { font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a, .nav button {
  font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--muted); text-decoration: none; background: none; border: 0; padding: 6px 0; cursor: pointer;
}
.nav a:hover, .nav button:hover { color: var(--accent); }
@media (max-width: 520px) { .brandmark span { display: none; } .nav { gap: 14px; } }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: 48px 0 40px; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); margin: 10px 0 8px; }
.hero p { margin: 0; color: var(--muted); max-width: 560px; }
.section-watermark {
  position: absolute; right: -40px; bottom: -30px; width: 280px; height: auto;
  opacity: 0.14; color: var(--greige); pointer-events: none; z-index: 0;
  animation: drift 20s ease-in-out infinite;
}
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-4px, 4px); } }
@media (max-width: 700px) { .section-watermark { width: 180px; } }

/* ---------------------------------------------------------------- sections */
.band { padding: 40px 0; }
.band.blush { background: var(--blush); }
.band.white { background: var(--white); }
.band h2 { font-size: clamp(22px, 3vw, 28px); margin: 8px 0 18px; }
.stack > * + * { margin-top: 14px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 2px; padding: 20px 22px; }
.band.white .card, .band.white .thanks { background: var(--cream); }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-family: var(--f-label); font-weight: 700; font-size: 12px; letter-spacing: 2.2px; text-transform: uppercase;
  background: var(--accent); color: var(--white); border: 1px solid var(--accent); border-radius: 2px;
  padding: 12px 20px; cursor: pointer; text-decoration: none; transition: transform .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--lift); }
.btn .star { width: 9px; height: 9px; }
.btn.navy { background: var(--navy); border-color: var(--navy); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--greige); }
.btn.small { padding: 8px 14px; font-size: 11px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }

/* ---------------------------------------------------------------- forms */
.field { display: block; }
.field > span { display: block; margin-bottom: 6px; }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); width: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: 2px; padding: 11px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sage); outline-offset: 0; border-color: var(--sage); }
textarea { min-height: 130px; resize: vertical; }
.error { color: #8A2B1E; font-size: 13px; margin: 0; min-height: 1.4em; }   /* error red: functional, not decorative */

/* ---------------------------------------------------------------- login */
.login { display: grid; place-items: center; padding: 64px 16px; position: relative; overflow: hidden; flex: 1; }
.login .card { width: 100%; max-width: 420px; padding: 34px 30px; position: relative; z-index: 1; }
.login .palm { width: 54px; height: 54px; color: var(--accent); margin-bottom: 18px; }
.login h1 { font-size: 30px; margin: 8px 0 22px; }
.login form > * + * { margin-top: 16px; }
.login .btn { width: 100%; }

/* ---------------------------------------------------------------- top: next up + glance */
.glance { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.spot { background: var(--navy); color: var(--cream); padding: 22px 24px; border-radius: 2px; position: relative; overflow: hidden; }
.spot .label { color: var(--sage); }
.hero .spot-title, .hero .spot-sub { max-width: none; }
.hero .spot-title { color: var(--cream); }
.hero .spot-sub { color: var(--on-navy); }
.hero .tile p { color: var(--ink); }
.spot-title { font-family: var(--f-head); font-weight: 700; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.2; margin: 10px 0 0; }
.spot-sub { margin: 6px 0 0; font-size: 14px; color: var(--on-navy); }
.spot::after {  /* one quiet star in the corner */
  content: ''; position: absolute; right: 18px; bottom: 16px; width: 22px; height: 22px; opacity: .5; background: var(--cream);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
.tile { background: var(--white); border: 1px solid var(--line); border-radius: 2px; padding: 18px 18px 16px; display: flex; flex-direction: column; justify-content: flex-start; gap: 14px; }
.tile p { margin: 0; font-family: var(--f-head); font-weight: 700; font-size: 20px; line-height: 1.2; }
@media (max-width: 860px) { .glance { grid-template-columns: repeat(3, 1fr); } .spot { grid-column: 1 / -1; } }
@media (max-width: 520px) { .tile { padding: 14px 12px; } .tile p { font-size: 16px; } }

/* ---------------------------------------------------------------- stepper */
.view-toggle { display: flex; gap: 0; margin-bottom: 22px; border: 1px solid var(--line); width: max-content; }
.view-toggle button {
  font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 2.2px; text-transform: uppercase;
  background: transparent; color: var(--muted); border: 0; padding: 9px 16px; cursor: pointer;
}
.view-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--white); }

.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--steps, 4), 1fr); position: relative; }
.waiting { margin: 0 0 22px; padding: 12px 16px; background: var(--white); border-left: 4px solid var(--accent); font-size: 14px; }
.warranty-note { margin-top: 26px; padding: 14px 18px; background: var(--white); border-left: 4px solid var(--sage); }
.warranty-note p { margin: 4px 0 0; font-size: 14px; }
.stepper li { position: relative; text-align: center; padding: 0 6px; }
.stepper li::before {   /* connector line */
  content: ''; position: absolute; top: 19px; left: -50%; right: 50%; height: 2px; background: var(--line);
}
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: var(--accent); }
.stepper .dot {
  position: relative; z-index: 1; width: 40px; height: 40px; margin: 0 auto 10px;
  display: grid; place-items: center; background: var(--white); border: 2px solid var(--line); color: var(--greige);
  transform: rotate(45deg); border-radius: 2px;
}
.stepper .dot > * { transform: rotate(-45deg); }
.stepper .dot svg { width: 16px; height: 16px; }
.stepper li.done .dot { background: var(--accent); border-color: var(--accent); color: var(--white); }
.stepper li.current .dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 5px rgba(0, 50, 74, 0.10); }
.stepper .name, .stepper .when { display: block; }

/* Stars fill in one by one when the page opens; the current one breathes. (Reduced-motion turns all of it off.) */
.stepper .dot { animation: star-in .45s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--i, 0) * .22s + .1s); }
.stepper li::before { transform-origin: left center; animation: line-in .35s ease-out both; animation-delay: calc(var(--i, 0) * .22s); }
.stepper li.current .dot { animation: star-in .45s cubic-bezier(.2, .9, .3, 1.3) both, star-breathe 2.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .22s + .1s), calc(var(--i, 0) * .22s + .7s); }
@keyframes star-in { from { opacity: 0; transform: rotate(45deg) scale(.4); } to { opacity: 1; transform: rotate(45deg) scale(1); } }
@keyframes line-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes star-breathe { 0%, 100% { box-shadow: 0 0 0 5px rgba(0, 50, 74, 0.10); } 50% { box-shadow: 0 0 0 11px rgba(0, 50, 74, 0.04); } }
@media (max-width: 640px) { .stepper li::before { transform-origin: top center; animation-name: line-in-v; } }
@keyframes line-in-v { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.stepper .name { font-family: var(--f-label); font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.stepper li.current .name { color: var(--accent); }
.stepper .when { font-size: 12px; color: var(--muted); line-height: 1.5; }
.stepper .now { display: block; font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; margin-top: 4px; }
@media (max-width: 640px) {
  .stepper { grid-template-columns: 1fr; gap: 0; }
  .stepper li { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; text-align: left; padding: 0 0 18px; }
  .stepper li::before { top: -18px; bottom: auto; left: 19px; right: auto; width: 2px; height: 18px; }
  .stepper .dot { margin: 0; grid-row: span 3; }
}

/* ---------------------------------------------------------------- calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h3 { font-size: 20px; }
.cal-head .btn { padding: 6px 12px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.cal .dow { background: transparent; padding: 8px 0; font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); text-align: center; }
.cal .day { aspect-ratio: 1 / 1; padding: 8px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; min-width: 0; }
.cal .day .num { font-size: 13px; line-height: 1.2; }
.cal .out { background: transparent; color: rgba(13, 13, 13, 0.3); }
.cal .is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal .is-today .num { font-weight: 600; color: var(--accent); }

/* Calendar entries: words, color-coded by a left edge. Flat, square, never pills. */
.ev { display: block; font-size: 12px; line-height: 1.3; padding: 3px 6px; border-left: 3px solid var(--accent); background: rgba(0, 50, 74, 0.07); color: var(--ink); overflow-wrap: anywhere; }
/* Phases = navy. Money and warranty use the quiet brand neutrals so they read apart from phases. */
.ev.pay { border-left-color: var(--sage); background: rgba(130, 169, 156, 0.18); }
.ev.paid { border-left-color: var(--greige); background: rgba(183, 165, 147, 0.16); }
.ev.warranty { border-left: 3px dashed var(--navy); background: transparent; }
.ev.today { border-left-color: var(--accent); background: var(--accent); color: var(--white); font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; }

/* Phone: square cells are too small for words. Cells show a colored line; the month's dates list below. */
.agenda { display: none; list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.agenda li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.agenda .when { color: var(--muted); font-size: 12px; }
@media (max-width: 700px) {
  .cal .day { padding: 4px; gap: 3px; }
  .cal .day .num { font-size: 12px; }
  .cal .day .ev { font-size: 0; padding: 0; height: 4px; border-left: 0; background: var(--accent); }
  .cal .day .ev.pay { background: var(--sage); }
  .cal .day .ev.paid { background: var(--greige); }
  .cal .day .ev.warranty { background: transparent; border-top: 2px dashed var(--navy); height: 0; }
  .agenda .ev { font-size: 13px; padding: 3px 6px; height: auto; }
  .agenda { display: block; }
}

/* ---------------------------------------------------------------- rows (payments, threads) */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row .what { font-weight: 600; }
.row .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.row .amt { font-family: var(--f-head); font-size: 20px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr auto; } .row > :last-child { grid-column: 1 / -1; justify-self: start; } }

.status {   /* flat all-caps callout, never a pill */
  font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  padding: 3px 8px; border-left: 3px solid currentColor; border-radius: 0;
}
.status.paid { color: var(--accent); }
.status.due { color: var(--ink); }
.status.overdue { color: #8A2B1E; }
.status.scheduled { color: var(--muted); }
.status.unpaid { color: var(--ink); }

/* ---------------------------------------------------------------- your build (browser-window spotlight) */
.build { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.build-copy h2 { margin: 8px 0 10px; }
.build-copy p { margin: 0 0 20px; color: var(--muted); }
.browser {
  display: block; text-decoration: none; background: var(--cream); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.browser:hover, .browser:focus-visible { transform: translateY(-4px); box-shadow: var(--lift); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--blush); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--greige); opacity: .7; flex: none; }
.browser-url {
  flex: 1; min-width: 0; margin-left: 8px; padding: 3px 10px; background: var(--white); border-radius: 2px;
  font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-body { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--cream); }
/* a tiny sketch of a page: title, three text lines, a button */
.wire { display: flex; flex-direction: column; gap: 9px; width: 58%; }
.wire b { display: block; height: 12px; width: 62%; background: var(--accent); opacity: .8; border-radius: 1px; }
.wire i { display: block; height: 6px; background: var(--greige); opacity: .45; border-radius: 1px; }
.wire i.short { width: 70%; }
.wire em { display: block; height: 18px; width: 34%; margin-top: 6px; background: var(--accent); border-radius: 2px; }
.browser:hover .wire em { background: var(--sage); }
@media (max-width: 760px) { .build { grid-template-columns: 1fr; gap: 22px; } }

/* ---------------------------------------------------------------- file tiles */
/* auto-fit + a max width: the row never shows an empty slot, tiles stay paper-sized */
.docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 150px)); gap: 26px; }
.doc { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.doc-name { font-weight: 600; font-size: 14px; line-height: 1.35; margin-top: 10px; }
.doc-sub { font-size: 12px; color: var(--muted); }

/* A sheet of paper: folded top-right corner, faint text lines */
.sheet {
  position: relative; display: block; aspect-ratio: 3 / 4; background: var(--white);
  border: 1px solid var(--line); border-radius: 2px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 13px, rgba(183, 165, 147, 0.35) 13px 14px);
  background-size: 64% 46%; background-position: 50% 62%; background-repeat: no-repeat;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
  transition: transform .2s, box-shadow .2s;
}
.sheet::after {   /* the fold */
  content: ''; position: absolute; top: 0; right: 0; width: 26px; height: 26px;
  background: linear-gradient(225deg, transparent 50%, var(--blush) 50%);
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.sheet::before {  /* a short "title" line */
  content: ''; position: absolute; top: 18%; left: 18%; width: 40%; height: 4px; background: var(--accent); opacity: .55;
}
.sheet-flag {
  position: absolute; left: 0; bottom: 14px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: var(--white); padding: 4px 10px 4px 8px; border-radius: 0 2px 2px 0;
  font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase;
}
.sheet-flag .star { width: 9px; height: 9px; }

/* A folder: tab on top, body below */
.folder {
  position: relative; display: block; aspect-ratio: 3 / 4; margin-top: 0;
  transition: transform .2s;
}
.folder::before {  /* tab */
  content: ''; position: absolute; top: 16%; left: 0; width: 44%; height: 12%;
  background: var(--greige); border-radius: 3px 3px 0 0;
}
.folder::after {   /* body */
  content: ''; position: absolute; top: 24%; left: 0; right: 0; bottom: 6%;
  background: linear-gradient(180deg, #c7b8a8, var(--greige)); border-radius: 0 3px 3px 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.doc:hover .sheet, .doc:focus-visible .sheet { transform: translateY(-4px) rotate(-1.5deg); box-shadow: var(--lift); }
.doc:hover .folder, .doc:focus-visible .folder { transform: translateY(-4px) rotate(1.5deg); }
.doc:hover .doc-name { color: var(--accent); }
.doc:focus-visible { outline: 2px solid var(--sage); outline-offset: 6px; }
@media (max-width: 520px) { .docs { grid-template-columns: repeat(var(--n, 3), minmax(0, 120px)); gap: 14px; } .sheet::after { width: 18px; height: 18px; } .sheet { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); } .sheet-flag { letter-spacing: 1px; padding: 3px 7px 3px 6px; } }

/* ---------------------------------------------------------------- review */
.thanks { border-left: 4px solid var(--accent); background: var(--white); padding: 18px 20px; }
.thanks p { margin: 4px 0 0; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--navy); color: var(--sage); padding: 22px 0; border-top: 1px solid rgba(252, 247, 245, 0.12); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--f-label); font-weight: 700; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; }
.site-footer a { color: var(--sage); text-decoration: none; }
.site-footer a:hover { color: var(--cream); }

/* ---------------------------------------------------------------- toast + states */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--navy); color: var(--cream); padding: 10px 18px; border-radius: 2px;
  font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  transition: opacity .2s, transform .2s; z-index: 50; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #8A2B1E; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- admin */
/* 6-track grid: cards span 2 (3 across). Each card is a subgrid of 6 rows, so the header, project,
   payment, call and task rows line up across every card in a row, whatever wraps. */
.grid { display: grid; grid-template-columns: repeat(6, 1fr); column-gap: 16px; row-gap: 16px; }
.pcard {
  grid-column: span 2; grid-row: span 6; display: grid; grid-template-rows: subgrid; row-gap: 8px; width: 100%;
  text-align: left; cursor: pointer; font: inherit; color: inherit; transition: transform .18s, box-shadow .18s;
}
.pcard.span-3 { grid-column: span 3; }
.pcard.span-6 { grid-column: span 6; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--lift); }
.pcard .top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pcard h3 { font-size: 20px; align-self: end; }
.pcard .kv { display: grid; grid-template-columns: 118px 1fr; gap: 14px; font-size: 13px; align-items: start; }
.pcard .k { font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
@media (max-width: 900px) {
  .pcard, .pcard.span-3 { grid-column: span 3; }
  .pcard:last-child:nth-child(odd) { grid-column: span 6; }
}
@media (max-width: 600px) { .pcard, .pcard.span-3, .pcard:last-child:nth-child(odd) { grid-column: span 6; } }
.chip { font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); padding: 2px 8px; border-radius: 2px; align-self: flex-start; }

.back { margin-bottom: 18px; }

/* Admin shell: side menu of clients → projects, content beside it */
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
.side { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; background: var(--white); border-right: 1px solid var(--line); min-height: calc(100vh - 74px); }
.side-box summary { display: none; }
.side-box nav { padding: 22px 0 28px; }
.side-all { display: block; margin: 0 14px 14px; padding: 9px 12px; font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); text-decoration: none; border-radius: 2px; }
.side-client { padding: 6px 14px 10px; }
.side-name { display: block; padding: 0 12px 4px; font-family: var(--f-head); font-weight: 700; font-size: 15px; color: var(--ink); }
.side-proj { display: grid; gap: 1px; padding: 7px 12px 7px 14px; margin-left: 2px; border-left: 2px solid var(--line); text-decoration: none; color: var(--ink); font-size: 13px; line-height: 1.35; }
.side-status { font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.side-proj:hover, .side-all:hover { background: var(--cream); color: var(--accent); }
.side-proj.active { border-left-color: var(--accent); background: var(--blush); font-weight: 600; }
.side-all.active { color: var(--accent); background: var(--blush); }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-box summary {
    display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; cursor: pointer; list-style: none;
    font-family: var(--f-label); font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
  }
  .side-box summary::-webkit-details-marker { display: none; }
  .side-box summary::after { content: '▾'; font-size: 14px; }
  .side-box[open] summary::after { content: '▴'; }
  .side-box nav { padding-top: 0; }
}

/* Project tabs: sticky under the header, scroll sideways on a phone */
.tabs { position: sticky; top: 0; z-index: 5; background: var(--cream); border-bottom: 1px solid var(--line); }
.tabs .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs button {
  font-family: var(--f-label); font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted);
  padding: 14px 14px 11px; cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--accent); }
.tabs button[aria-current="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.panel > h2 { font-size: 24px; margin: 0 0 16px; }

/* Field cards on the Overview tab */
.fcard { background: var(--cream); border: 1px solid var(--line); border-radius: 2px; padding: 20px 22px; }
.fcard + .fcard { margin-top: 16px; }
.fcard h3 { font-size: 19px; margin: 0 0 14px; }
.fcard > .field + .fields { margin-top: 14px; }
.fcard .note { margin-top: 10px; }
.fields { display: grid; gap: 14px; }
.fields.f2 { grid-template-columns: repeat(2, 1fr); }
.fields.f3 { grid-template-columns: repeat(3, 1fr); }
.fields.f4 { grid-template-columns: repeat(4, 1fr); }
.fields .label { white-space: nowrap; }
.field > label > .label { display: block; margin-bottom: 6px; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; cursor: pointer; }
@media (max-width: 860px) { .fields.f4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .fields.f3 { grid-template-columns: 1fr; } }   /* 3 → 1, never 2 + an empty slot */
@media (max-width: 520px) { .fields.f2, .fields.f4 { grid-template-columns: 1fr; } }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-sec { padding: 28px 0; border-top: 1px solid var(--line); }
.admin-sec:first-of-type { border-top: 0; }
.admin-sec h2 { font-size: 22px; margin: 6px 0 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }

table.edit { width: 100%; border-collapse: collapse; font-size: 14px; }
table.edit th { font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.edit td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.edit input, table.edit select { padding: 7px 8px; font-size: 14px; }
.scroll { overflow-x: auto; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
input.pos { width: 64px; }

.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li { display: grid; grid-template-columns: 64px 22px 1fr 150px 84px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tasks input.due { padding: 6px 8px; font-size: 13px; color: var(--muted); border-color: transparent; background: transparent; }
.tasks input.due:hover, .tasks input.due:focus { border-color: var(--line); }
.tasks input.due.late { color: #8A2B1E; font-weight: 600; }
.tasks input.due.empty { opacity: .25; }
.tasks li:hover input.due.empty, .tasks input.due.empty:focus { opacity: 1; }
@media (max-width: 700px) { .tasks li { grid-template-columns: 52px 22px 1fr; } .tasks li > :nth-child(4), .tasks li > :nth-child(5) { grid-column: 3; } }
.tasks li.sub { padding-left: 36px; }
.tasks li.done input[type="text"] { text-decoration: line-through; color: var(--muted); }
.tasks input[type="text"] { border-color: transparent; background: transparent; padding: 6px 8px; }
.tasks input[type="text"]:hover { border-color: var(--line); }
.inline-add { display: flex; gap: 10px; margin-top: 12px; }
.inline-add input { flex: 1; }
.linkish { background: none; border: 0; color: var(--accent); font-family: var(--f-label); font-weight: 700; font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; cursor: pointer; padding: 4px 0; white-space: nowrap; }

.call { padding: 16px 0; border-bottom: 1px solid var(--line); }
.call h3 { font-family: var(--f-body); font-size: 15px; font-weight: 600; }
.call .meta { font-size: 13px; color: var(--muted); }
.call ul { margin: 8px 0 0; padding-left: 18px; }
.addform { display: grid; gap: 10px; margin-top: 16px; padding: 16px; background: var(--white); border: 1px solid var(--line); }
.addform textarea { min-height: 90px; }
