:root {
  --ink: #0e2440; --ink2: #132e52; --panel: #15335b; --line: #DCE7F2; --dim: #9DB4CC; --hi: #F4F8FC;
  --tape: #E8C15A; --tapeText: #2B2414; --ok: #5fd39a; --warn: #f2c14e; --bad: #ff7a7a; --li: #0A66C2;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ink); color: var(--line); font-family: "Archivo", system-ui, sans-serif; font-size: 15px; line-height: 1.45;
  background-image:
    linear-gradient(rgba(220,231,242,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(220,231,242,.05) 1px, transparent 1px),
    linear-gradient(rgba(220,231,242,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(220,231,242,.025) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; border-bottom: 1px solid rgba(220,231,242,.12); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; }
.mark { width: 54px; height: 54px; filter: drop-shadow(0 6px 18px rgba(232,193,90,.25)); }
.wordmark { font-stretch: 72%; font-weight: 900; font-size: 34px; letter-spacing: .02em; color: var(--hi); line-height: .9; }
.wordmark span { color: var(--tape); }
.tagline { font-family: "Permanent Marker", cursive; color: var(--dim); font-size: 14px; margin-top: 4px; }
.status { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-family: "JetBrains Mono", monospace; font-size: 11px; padding: 5px 10px; border-radius: 99px; border: 1px solid rgba(220,231,242,.2); color: var(--dim); }
.pill.ok { border-color: rgba(95,211,154,.5); color: var(--ok); }
.pill.warn { border-color: rgba(242,193,78,.5); color: var(--warn); }

/* layout */
.grid { display: grid; grid-template-columns: minmax(320px, 400px) 1fr; gap: 24px; padding: 24px 28px 60px; align-items: start; }
@media (max-width: 960px) { .grid { grid-template-columns: 1fr; padding: 16px; } .top { padding: 14px 16px; } }
.panel { background: rgba(19,46,82,.82); border: 1px solid rgba(220,231,242,.14); border-radius: var(--r); padding: 20px; backdrop-filter: blur(6px); }
.forge { position: sticky; top: 16px; }
@media (max-width: 960px) { .forge { position: static; } }
h2 { font-stretch: 78%; font-weight: 800; font-size: 19px; letter-spacing: .04em; text-transform: uppercase; color: var(--hi); margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; }
h2:first-child { margin-top: 0; }
.step { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--tapeText); background: var(--tape); padding: 2px 6px; border-radius: 4px; letter-spacing: 0; }
label { display: block; margin-top: 10px; }
label > span { display: block; font-size: 12px; color: var(--dim); margin-bottom: 4px; }
input, select, textarea { width: 100%; background: rgba(14,36,64,.8); border: 1px solid rgba(220,231,242,.2); border-radius: 9px; padding: 9px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--tape); }
textarea { resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fine { font-size: 12px; color: var(--dim); margin: 8px 0 0; }

/* channels */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(220,231,242,.2); background: rgba(14,36,64,.6); cursor: pointer; font-weight: 600; font-stretch: 85%; }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px rgba(255,255,255,.05); }
.chip.on { border-color: var(--tape); background: rgba(232,193,90,.12); color: var(--hi); }
.chip[disabled] { opacity: .45; cursor: not-allowed; }
.chip small { font-family: "JetBrains Mono", monospace; font-size: 9px; color: var(--dim); text-transform: uppercase; }
.algo { margin-top: 10px; font-size: 12.5px; color: var(--dim); border-left: 3px solid var(--li); padding: 4px 0 4px 12px; }
.algo summary { cursor: pointer; color: var(--line); font-weight: 600; }
.algo ul { margin: 8px 0 0; padding-left: 16px; }

/* topics */
.topics { display: grid; gap: 8px; max-height: 330px; overflow: auto; padding-right: 4px; }
.topic { text-align: left; border: 1px solid rgba(220,231,242,.16); background: rgba(14,36,64,.55); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.topic.on { border-color: var(--tape); box-shadow: inset 3px 0 0 var(--tape); }
.topic b { display: block; color: var(--hi); font-weight: 650; font-stretch: 90%; }
.topic .meta { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tag { font-family: "JetBrains Mono", monospace; font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(220,231,242,.1); color: var(--dim); }
.tag.drafted { background: rgba(95,211,154,.15); color: var(--ok); }
.tag.proposed { background: rgba(232,193,90,.15); color: var(--tape); }
.newtopic input { border-style: dashed; }

/* strike */
.strike { margin-top: 18px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 15px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, #f3d277, #d9a93a); color: var(--tapeText); font-weight: 900; font-stretch: 75%; font-size: 22px; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(232,193,90,.25), inset 0 -3px 0 rgba(0,0,0,.18); transition: transform .08s; }
.strike:hover { transform: translateY(-1px); }
.strike:active { transform: translateY(2px) scale(.99); }
.strike svg { width: 22px; height: 22px; fill: currentColor; }
.strike[disabled] { filter: grayscale(.6); opacity: .6; cursor: not-allowed; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(220,231,242,.14); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--dim); font-weight: 700; font-stretch: 85%; letter-spacing: .03em; text-transform: uppercase; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--hi); border-color: var(--tape); }

/* piece header */
.piecehead { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.piecehead h1 { margin: 0; font-stretch: 72%; font-weight: 850; font-size: 40px; line-height: .98; color: var(--hi); max-width: 720px; }
.piecehead p { margin: 8px 0 0; color: var(--dim); max-width: 720px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px; border: 1px solid rgba(220,231,242,.25); background: rgba(14,36,64,.6); cursor: pointer; text-decoration: none; color: var(--line); font-size: 13px; font-weight: 600; }
.btn:hover { border-color: var(--tape); }
.sectionlabel { font-family: "Permanent Marker", cursive; color: var(--tape); font-size: 20px; margin: 26px 0 10px; transform: rotate(-1deg); display: inline-block; }

/* LinkedIn mocks (light, like the real feed) */
.li { background: #fff; color: #191919; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.35); font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; }
.li .who { display: flex; gap: 10px; padding: 12px 16px 6px; align-items: center; }
.li .av { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #17375E, #2b5a8f); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; }
.li .nm { font-weight: 600; font-size: 14px; }
.li .hl, .li .tm { font-size: 12px; color: rgba(0,0,0,.6); line-height: 1.3; }
.li .tx { padding: 4px 16px 10px; font-size: 14px; line-height: 1.43; white-space: pre-wrap; }
.li .more { color: rgba(0,0,0,.6); cursor: pointer; font-weight: 500; }
.li .tags { color: var(--li); }
.li .media { background: #f3f2ef; }
.li .media > * { display: block; width: 100%; }
.li .bar { display: flex; justify-content: space-around; border-top: 1px solid #e8e8e8; padding: 4px 8px; font-size: 13px; color: rgba(0,0,0,.6); font-weight: 600; }
.li .bar span { padding: 10px 8px; }
.li .cm { margin: 0 16px 14px; background: #f2f2f2; border-radius: 0 8px 8px 8px; padding: 8px 12px; font-size: 13px; }
.li .cm b { display: block; font-size: 12px; }
.article { max-width: 760px; }
.article .body { padding: 6px 28px 28px; }
.article h1 { font-family: Georgia, "Times New Roman", serif; font-size: 34px; line-height: 1.15; margin: 18px 0 10px; }
.article h3 { font-size: 20px; margin: 26px 0 8px; }
.article .tldr { background: #f3f6f8; border-left: 4px solid var(--li); padding: 10px 16px 10px 30px; margin: 14px 0; }
.article p, .article li { font-size: 16px; line-height: 1.6; }
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
@media (max-width: 420px) { .posts { grid-template-columns: 1fr; } }
.postcard .lbl { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.postcard .lbl b { font-stretch: 80%; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--hi); }
.checks { background: rgba(232,193,90,.08); border: 1px dashed rgba(232,193,90,.45); border-radius: 12px; padding: 12px 16px 12px 34px; color: var(--line); }
.checks li { margin: 4px 0; }

/* algorithm check */
.score { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--tape) calc(var(--p) * 1%), rgba(220,231,242,.12) 0); }
.ring div { width: 72px; height: 72px; border-radius: 50%; background: var(--ink2); display: grid; place-items: center; font-weight: 900; font-stretch: 75%; font-size: 26px; color: var(--hi); }
.lint { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.lint .card h4 { margin: 0 0 8px; font-stretch: 80%; text-transform: uppercase; letter-spacing: .05em; color: var(--hi); }
.lint .item { display: flex; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed rgba(220,231,242,.08); }
.lint .item em { margin-left: auto; color: var(--dim); font-style: normal; font-family: "JetBrains Mono", monospace; font-size: 11px; text-align: right; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none; }
.dot.pass { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.fail { background: var(--bad); }

/* what's next */
.nextup { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px 20px; margin-bottom: 22px; background: linear-gradient(120deg, rgba(232,193,90,.18), rgba(232,193,90,.04)); border: 1px solid rgba(232,193,90,.5); border-radius: var(--r); }
@media (max-width: 640px) { .nextup { grid-template-columns: 1fr; } }
.nextup .when { font-stretch: 70%; font-weight: 900; font-size: 34px; color: var(--hi); line-height: .95; }
.nextup .when small { display: block; font-size: 13px; color: var(--tape); font-weight: 600; font-stretch: 100%; letter-spacing: .05em; text-transform: uppercase; }
.nextup .what b { font-size: 18px; color: var(--hi); display: block; }
.week { margin: 18px 0 8px; font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.tl { position: relative; padding-left: 28px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: rgba(220,231,242,.15); }
.slot { position: relative; display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; margin-bottom: 10px; background: rgba(19,46,82,.82); border: 1px solid rgba(220,231,242,.14); border-radius: 12px; }
.slot::before { content: ""; position: absolute; left: -24px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--c, var(--li)); box-shadow: 0 0 0 4px var(--ink); }
.slot.article { border-color: rgba(232,193,90,.45); }
.slot.article::before { background: var(--tape); width: 16px; height: 16px; margin-top: -8px; left: -26px; }
@media (max-width: 640px) { .slot { grid-template-columns: 1fr; } }
.slot .d { font-weight: 800; font-stretch: 80%; color: var(--hi); }
.slot .d small { display: block; color: var(--dim); font-weight: 500; font-family: "JetBrains Mono", monospace; font-size: 11px; }
.slot .k { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--tape); }
.slot .t { color: var(--hi); font-weight: 650; }
.slot .n { font-size: 12px; color: var(--dim); }
.slot select { width: auto; padding: 6px 8px; font-size: 12px; }
.st-approved { color: var(--ok); } .st-scheduled { color: var(--tape); } .st-posted { color: var(--dim); text-decoration: line-through; }

/* library */
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.libcard { cursor: pointer; padding: 0; overflow: hidden; }
.libcard .thumb { aspect-ratio: 16/9; background: var(--ink2); overflow: hidden; }
.libcard .thumb > * { width: 100%; display: block; }
.libcard div.p { padding: 12px 14px; }
.libcard b { color: var(--hi); display: block; }

/* forging overlay */
.forging { position: fixed; inset: 0; background: rgba(8,22,40,.92); display: grid; place-content: center; justify-items: center; gap: 14px; z-index: 50; text-align: center; padding: 16px; }
.forging[hidden] { display: none; }
.anvil { position: relative; width: 150px; height: 150px; animation: strike .9s infinite cubic-bezier(.3,1.6,.5,1); }
.anvil img { width: 100%; }
@keyframes strike { 0%,100% { transform: translateY(0) } 12% { transform: translateY(5px) scale(.98) } 30% { transform: translateY(0) } }
.sparks i { position: absolute; left: 53%; top: 38%; width: 4px; height: 4px; border-radius: 50%; background: #FFE08A; box-shadow: 0 0 8px #FFD978; animation: spark .9s infinite ease-out; opacity: 0; }
.sparks i:nth-child(1) { --x: -60px; --y: -50px; } .sparks i:nth-child(2) { --x: 55px; --y: -60px; animation-delay: .05s; }
.sparks i:nth-child(3) { --x: -30px; --y: -80px; animation-delay: .1s; } .sparks i:nth-child(4) { --x: 70px; --y: -20px; animation-delay: .02s; }
.sparks i:nth-child(5) { --x: -75px; --y: -15px; animation-delay: .08s; } .sparks i:nth-child(6) { --x: 20px; --y: -90px; animation-delay: .12s; }
@keyframes spark { 0%,10% { transform: translate(0,0); opacity: 0 } 14% { opacity: 1 } 60% { transform: translate(var(--x), var(--y)); opacity: 0 } 100% { opacity: 0 } }
.forgeline { font-family: "Permanent Marker", cursive; font-size: 26px; color: var(--tape); min-height: 1.3em; }
.timer { font-family: "JetBrains Mono", monospace; color: var(--dim); }

.empty { padding: 50px 20px; text-align: center; color: var(--dim); }
.empty b { font-family: "Permanent Marker", cursive; color: var(--tape); font-size: 24px; display: block; margin-bottom: 6px; font-weight: 400; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--hi); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100% - 32px); }
.toast.err { background: var(--bad); color: #2a0b0b; }
