/* Plain placeholder styles: the framework's logic first, the design later. */
:root {
    --ink: #1d1d1f; --muted: #6e6e73; --line: #d9d9de; --bg: #f5f5f7; --card: #fff;
    --accent: #2457d6; --ok: #1a7f37; --warn: #9a6700; --bad: #c62828; --dev: #2b2b2b;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg);
       padding-bottom: 120px; }
a { color: var(--accent); }
h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 28px 0 10px; }
main { max-width: 1040px; margin: 0 auto; padding: 20px 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

#top { background: var(--card); border-bottom: 1px solid var(--line); }
#top .bar { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 16px; align-items: center;
            flex-wrap: wrap; }
#top .brand { font-weight: 700; text-decoration: none; color: var(--ink); }
#top nav { display: flex; gap: 14px; flex-wrap: wrap; }
#top nav a { text-decoration: none; }
#top nav a.on { font-weight: 600; color: var(--ink); }
#top .me { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card.on { border-color: var(--ok); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 8px; }

.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: #e8e8ed; }
.badge.ok { background: #dcf3e2; color: var(--ok); }
.badge.warn { background: #fff1c9; color: var(--warn); }
.badge.bad { background: #fde0e0; color: var(--bad); }

button, .button { font: inherit; padding: 6px 12px; border-radius: 7px; border: 1px solid var(--line);
                  background: var(--card); cursor: pointer; text-decoration: none; color: var(--ink);
                  display: inline-block; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
input, select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff;
                max-width: 100%; }
label { display: inline-flex; gap: 6px; align-items: center; }

.banner { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; background: #e8efff; }
.banner.warn { background: #fff1c9; }
.banner.bad { background: #fde0e0; }
.notice { position: fixed; left: 50%; transform: translateX(-50%); bottom: 70px; max-width: calc(100% - 32px);
          background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 10; }
.notice.bad { background: var(--bad); }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.cell-seat { white-space: nowrap; }
.log { font-family: ui-monospace, monospace; font-size: 13px; background: var(--card); border: 1px solid var(--line);
       border-radius: 10px; padding: 10px; min-height: 60px; }

#dev { position: fixed; left: 0; right: 0; bottom: 0; background: var(--dev); color: #eee; font-size: 13px; z-index: 5; }
#dev .bar { max-width: 1040px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 8px; align-items: center;
            flex-wrap: wrap; }
#dev button { background: #444; color: #fff; border-color: #555; padding: 3px 9px; font-size: 13px; }
#dev a { color: #9cc0ff; }
#dev .on { background: var(--bad); }

/* The tools' placeholder screens. A thumb stands in for a picture of the work, drawn from the client's colours. */
.narrow { max-width: 520px; }
.col { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.row.top { align-items: flex-start; }
.row.bottom { align-items: flex-end; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin: 12px 0; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
a.plain { text-decoration: none; color: inherit; }
.grid > .card.stack { display: flex; flex-direction: column; align-items: flex-start; }
.grid > .card.stack > * + * { margin-top: 0; }
.grid > .card.stack { gap: 6px; }
.card.ok { border-color: var(--ok); background: #f3fbf5; }
button.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; width: 100%; }
code { background: var(--bg); padding: 2px 6px; border-radius: 5px; font-size: 13px; overflow-wrap: anywhere; }

.thumb { position: relative; aspect-ratio: 2 / 1; width: 100%; border-radius: 6px; padding: 8%; display: flex;
         flex-direction: column; justify-content: center; gap: 4px; overflow: hidden; border: 1px solid #0001;
         container-type: inline-size; }
.thumb b { font-size: 9cqw; line-height: 1.05; }
.thumb span { font-size: 5cqw; opacity: .8; }
.thumb.l2 { align-items: center; text-align: center; }
.thumb.l3 { justify-content: flex-end; }
.thumb.big { max-width: 520px; }
.thumb.tiny { width: 72px; padding: 6px; border-radius: 4px; }
.thumb.fill { height: 100%; border: 0; border-radius: 0; }
.thumb.flat { filter: grayscale(.7) blur(.4px); }
.thumb.doc { aspect-ratio: 3 / 4; max-width: 160px; }
.thumb.tiny.doc { width: 40px; }
.thumb.video::after { content: '▶'; position: absolute; right: 8%; bottom: 8%; font-size: 8cqw; }
.fit { width: 160px; }
.fit .thumb { border: 1px solid #0001; border-radius: 4px; }

.board { margin: 0; width: 220px; }
.board.big { width: 320px; }
.board.tiny { width: 72px; }
.board-face { aspect-ratio: 2 / 1; padding: 6px; background: #4a4a4f; border-radius: 4px;
              box-shadow: 0 14px 0 -10px #4a4a4f, 0 22px 0 -10px #8a8a90; }
.board figcaption { margin-top: 16px; }
.board.tiny .board-face { padding: 3px; }
.board.tiny figcaption { display: none; }

.swatch { display: inline-block; width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line);
          margin-right: 6px; }
.tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin: 12px 0; }
.tabs a { padding: 6px 0; text-decoration: none; color: var(--muted); }
.tabs a.on { color: var(--ink); border-bottom: 2px solid var(--accent); font-weight: 600; }
.chip { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: inherit;
        border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px 4px 4px; background: var(--card); }
.chip .thumb.tiny, .chip .board.tiny { width: 48px; }

.chat { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.msg { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; max-width: 85%; }
.msg.rep, .msg.ai { align-self: flex-end; background: #e8efff; }
.msg.system { align-self: center; background: none; border: 0; color: var(--muted); font-size: 13px; }

.meter { display: grid; grid-template-columns: 150px 1fr 32px; gap: 8px; align-items: center; font-size: 13px; }
.meter i { display: block; height: 8px; border-radius: 4px; background: var(--accent); }
/* Usage by rep: each person's credits this month, as a bar against the most anyone used. */
.spend { display: flex; gap: 8px; align-items: center; }
.spend b { min-width: 32px; }
.spend i { display: block; height: 8px; border-radius: 4px; background: var(--accent); }
.report { border-top: 4px solid var(--ink); }
.report h2 { margin-top: 0; }

/* What clients see, in the workspace's branding. */
.brandbar { display: flex; gap: 10px; align-items: center; padding: 10px 16px; background: var(--card); color: var(--ink);
            border-bottom: 1px solid var(--line); }
.brandbar[style] { color: #fff; border-radius: 0; }
.stack > .brandbar { border-radius: 10px; border: 1px solid var(--line); }
img.logo { height: 32px; max-width: 140px; object-fit: contain; }
/* On Free, the client's page says it's made with AdStak, quietly. */
.powered { margin-top: 32px; text-align: center; font-size: 12px; color: var(--muted); }
.powered a { color: inherit; }
#top .me a.on { font-weight: 600; color: var(--ink); }
.signout { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); }

/* The top bar's Tools menu and icons, and the links at the bottom of each page. */
details.menu { position: relative; }
details.menu summary { list-style: none; cursor: pointer; color: var(--accent); }
details.menu summary::-webkit-details-marker { display: none; }
details.menu summary::after { content: ' ▾'; font-size: 11px; }
details.menu summary.on { font-weight: 600; color: var(--ink); }
details.menu > div { position: absolute; top: calc(100% + 8px); left: -10px; z-index: 20; min-width: 160px; display: flex;
                     flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
                     padding: 6px; box-shadow: 0 8px 24px #0002; }
details.menu > div a { padding: 6px 10px; border-radius: 6px; }
details.menu > div a:hover { background: var(--bg); }
#top a.icon { position: relative; display: inline-flex; color: var(--muted); }
#top a.icon.on, #top a.icon:hover { color: var(--ink); }
#top .dot { position: absolute; top: -6px; right: -8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
            background: var(--bad); color: #fff; font-size: 11px; line-height: 17px; text-align: center; }
#foot .bar { max-width: 1040px; margin: 40px auto 0; padding: 16px; display: flex; gap: 18px; border-top: 1px solid var(--line);
             font-size: 13px; }
#foot a { color: var(--muted); text-decoration: none; }
#foot a:hover, #foot a.on { color: var(--ink); }

/* The credits link and the notifications panel in the top bar. */
#top a.credits { color: var(--ink); text-decoration: none; }
#top a.credits:hover, #top a.credits.on { color: var(--accent); }
#top .notes { position: relative; display: inline-flex; }
#top button.icon { position: relative; display: inline-flex; padding: 0; border: 0; background: none; color: var(--muted); }
#top button.icon:hover, #top button.icon[aria-expanded="true"] { color: var(--ink); }
#notes { position: absolute; top: calc(100% + 10px); right: -8px; z-index: 30; width: min(380px, calc(100vw - 24px));
         max-height: min(480px, 70vh); overflow-y: auto; background: var(--card); border: 1px solid var(--line);
         border-radius: 12px; padding: 12px; box-shadow: 0 12px 32px #0003; }
#notes h3 { margin: 0 0 8px; font-size: 15px; }
#notes .note { padding: 8px 10px; border-radius: 8px; }
#notes .note + .note { margin-top: 2px; }
#notes .note.new { background: #eef3ff; }
#notes .note[data-act] { cursor: pointer; }
#notes .note[data-act]:hover { background: var(--bg); }

/* Create: the tools in two groups, each with what it does. */
details.menu.create > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px;
                            width: min(620px, calc(100vw - 24px)); padding: 12px; }
@media (max-width: 640px) { details.menu.create > div { grid-template-columns: 1fr; } }
details.menu.create h4 { margin: 4px 10px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
                         color: var(--muted); }
details.menu.create a { display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; }
details.menu.create a span { font-size: 13px; color: var(--muted); line-height: 1.35; }
details.menu.create a.on b { color: var(--accent); }
#top a.credits { display: inline-flex; align-items: center; gap: 4px; }
#top a.credits svg { width: 18px; height: 18px; color: #e0a100; }

/* The library's files and clients' logos: real images, shown whole on a light ground. */
.file-thumb { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--bg);
              border-radius: 6px; }
.grid.files { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.logo-img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: contain; background: var(--bg);
            border-radius: 6px; padding: 8%; }
.logo-img.big { max-width: 520px; }
