:root {
  --bg: #030d11;
  --bg-alt: #041920;
  --grid: rgba(0, 255, 170, 0.05);
  --text: #d6fff6;
  --muted: #6ee0c1;
  --accent: #3cff96;
  --accent-soft: rgba(60, 255, 150, 0.2);
  --danger: #ff3366;
  --font-stack: "Fira Code", "JetBrains Mono", "Source Code Pro", monospace;
  --cursor-base: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4" fill="%230aff9d"/><circle cx="12" cy="12" r="8" stroke="%230aff9d" stroke-width="1" fill="none"/></svg>') 12 12, crosshair;
  --cursor-hover: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28"><circle cx="14" cy="14" r="5" fill="%230aff9d"/><circle cx="14" cy="14" r="11" stroke="%230aff9d" stroke-width="1.2" fill="none"/></svg>') 14 14, pointer;
}

* {
  body {
    margin: 0;
    font-family: var(--font-stack);
    background: radial-gradient(circle at top, var(--bg-alt) 0%, var(--bg) 55%, #000 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    cursor: var(--cursor-base);
  }
}

body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body::-webkit-scrollbar-track {
  background: rgba(3, 13, 17, 0.6);
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), #39c2ff);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(60, 255, 150, 0.6);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a,
button,
.btn,
.tag,
input,
textarea,
select,
.tag-chip,
.token-chip {
  cursor: var(--cursor-base);
}

a:hover,
button:hover,
.btn:hover,
.tag:hover,
input:hover,
textarea:hover,
a:focus,
button:focus,
.btn:focus,
.tag:focus,
input:focus,
textarea:focus {
  cursor: var(--cursor-hover);
}

a:focus {
  text-decoration: underline;
}

.background-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(transparent 14px, var(--grid) 15px),
    linear-gradient(90deg, transparent 14px, var(--grid) 15px);
  background-size: 15px 15px;
  pointer-events: none;
  opacity: 0.4;
  z-index: 0;
}

.scanline {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.2) 3px
  );
  mix-blend-mode: screen;
  opacity: 0.2;
  pointer-events: none;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(2, 10, 12, 0.9);
  border-bottom: 1px solid var(--accent-soft);
  backdrop-filter: blur(8px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 5vw;
}

.site-title {
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}


.site-main {
  position: relative;
  z-index: 2;
  padding: 4rem 5vw 5rem;
}

.hero {
  background: rgba(3, 13, 17, 0.9);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 0 35px rgba(60, 255, 150, 0.1);
}

.prompt {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero .meta {
  color: var(--muted);
  max-width: 55ch;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn.secondary {
  border-color: var(--muted);
  color: var(--muted);
}

.btn.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn.danger:hover,
.btn.danger:focus-visible {
  background: rgba(255, 51, 102, 0.15);
  color: #ff6588;
}

.btn:hover,
.btn:focus-visible {
  background: rgba(60, 255, 150, 0.12);
}

.btn.secondary:hover,
.btn.secondary:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}


.section-title {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: rgba(2, 16, 20, 0.9);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  min-height: 230px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(2, 10, 12, 0.7);
  z-index: 20;
  pointer-events: none;
}

.scroll-progress::after {
  content: "";
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, #0aff9d, #38bdf8);
  box-shadow: 0 0 12px rgba(58, 189, 248, 0.7);
  transition: width 0.1s ease-out;
}

.post-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(60, 255, 150, 0.08);
  border-radius: 8px;
  pointer-events: none;
}

.post-date {
  color: var(--muted);
  font-size: 0.85rem;
}

.post-card h3 {
  margin-top: 0.2rem;
  margin-bottom: 0.8rem;
}

.post-card p {
  margin: 0 0 1rem;
  color: #c1fff2;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.post-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.post-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: baseline;
}

.meta-separator {
  color: var(--accent);
  letter-spacing: 0.15em;
  font-weight: 600;
}

.post-date {
  font-weight: 600;
  color: #e9fefa;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.post-author {
  color: #8cf8d0;
  font-style: italic;
}

.archive-card-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.post-reading-time {
  color: #7feacf;
  font-weight: 500;
}

.tag {
  border: 1px solid var(--accent-soft);
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-radius: 999px;
}

.content-card {
  background: rgba(2, 16, 20, 0.95);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
}

.content-card h1,
.content-card h2,
.content-card h3 {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.content-body p,
.post-body p {
  margin-bottom: 1.2rem;
}

.content-body code,
.post-body code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  border: 1px solid rgba(60, 255, 150, 0.2);
}

pre,
.highlight,
.highlight pre {
  background: #111417;
  color: #e6f3ff;
  padding: 1.6rem 1.75rem;
  border-radius: 14px;
  border: 1px solid rgba(20, 192, 168, 0.25);
  overflow-x: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45);
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

.highlight pre {
  margin: 0;
}

.post-body code,
.content-body code,
.highlight code {
  background: rgba(17, 20, 23, 0.85);
  color: #e6f3ff;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  border: none;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SFMono-Regular', Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}

.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr {
  color: #c586c0;
}

.highlight .nf,
.highlight .nc,
.highlight .ne,
.highlight .nn {
  color: #4ec9b0;
}

.highlight .nt,
.highlight .na,
.highlight .nb {
  color: #569cd6;
}

.highlight .s,
.highlight .sb,
.highlight .s1,
.highlight .s2,
.highlight .se,
.highlight .si,
.highlight .sx {
  color: #ce9178;
}

.highlight .mi,
.highlight .mf,
.highlight .mh,
.highlight .il {
  color: #b5cea8;
}

.highlight .c,
.highlight .cm,
.highlight .cp,
.highlight .c1,
.highlight .cs {
  color: #6a9955;
  font-style: italic;
}

.highlight .o,
.highlight .p,
.highlight .ow {
  color: #d4d4d4;
}

.post-banner {
  margin: 1.75rem 0 2rem;
  padding: 1rem 0;
}

.post-banner img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(60, 255, 150, 0.25);
  display: block;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.post-banner figcaption {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.site-footer {
  padding: 2rem 5vw 4rem;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--accent-soft);
  background: rgba(2, 10, 12, 0.9);
}

.site-footer a {
  color: var(--accent);
}

.terminal-grid {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(60, 255, 150, 0.2);
  position: relative;
}

.terminal-grid::before {
  content: "status: online";
  position: absolute;
  top: -0.8rem;
  right: 1rem;
  font-size: 0.75rem;
  color: var(--accent);
  padding: 0 0.5rem;
  background: #010707;
}

.alert {
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 0.8rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* Post Builder */
.builder {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.builder-header {
  position: relative;
  padding-right: 9rem;
}

.builder-clear-control {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
}

@media (max-width: 720px) {
  .builder-header {
    padding-right: 0;
  }

  .builder-clear-control {
    position: static;
    margin-top: 1rem;
    align-self: flex-end;
  }
}

.builder-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.builder-steps li {
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: border 0.2s ease, color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.builder-steps li[data-state='active'] {
  border-color: var(--accent);
  color: var(--accent);
}

.builder-steps li[data-state='complete'] {
  color: #9fffe2;
  border-color: rgba(159, 255, 226, 0.4);
}


.builder-form {
  display: grid;
  gap: 1.2rem;
}

.builder-steps-flow {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.builder-step {
  display: none;
  flex-direction: column;
  gap: 1.2rem;
  animation: builderStepFade 0.25s ease;
}

.builder-step--active {
  display: flex;
}

@keyframes builderStepFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.builder-step-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(60, 255, 150, 0.2);
  border-radius: 10px;
  background: rgba(1, 12, 15, 0.6);
}

.builder-step-nav .btn {
  width: auto;
  min-width: 140px;
  justify-self: start;
}

#pb-step-next {
  justify-self: end;
}

.builder-step-status {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--muted);
  justify-self: center;
  text-align: center;
}

.builder-step-nav button[hidden] {
  display: none;
}

.builder-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.builder-field label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.builder-field input,
.builder-field textarea,
.builder-field select {
  width: 100%;
  background: rgba(1, 12, 15, 0.85);
  border: 1px solid rgba(60, 255, 150, 0.25);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-stack);
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.builder-field textarea {
  min-height: 200px;
  resize: vertical;
}

.builder-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath fill='%233CFF96' d='M1 1l7 7 7-7' stroke='%233CFF96' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 0.8rem;
  padding-right: 2.5rem;
  cursor: var(--cursor-base);
}

.builder .EasyMDEContainer {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(7, 31, 28, 0.16);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: none;
}

.builder .EasyMDEContainer .CodeMirror,
.builder .EasyMDEContainer textarea {
  width: 100%;
}

.builder .EasyMDEContainer,
.builder .EasyMDEContainer .CodeMirror,
.builder .EasyMDEContainer .CodeMirror-scroll,
.builder .EasyMDEContainer .CodeMirror-sizer,
.builder .EasyMDEContainer .CodeMirror-lines,
.builder .EasyMDEContainer .CodeMirror-code,
.builder .EasyMDEContainer .CodeMirror pre,
.builder .EasyMDEContainer .editor-preview,
.builder .EasyMDEContainer .editor-preview-side,
.builder .EasyMDEContainer .editor-preview-active {
  background: #ffffff !important;
  color: #0a1416;
  box-shadow: none;
  border: none;
}

.builder .EasyMDEContainer .editor-toolbar {
  border-radius: 0;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid rgba(7, 31, 28, 0.12);
}

.builder .EasyMDEContainer .editor-toolbar button,
.builder .EasyMDEContainer .editor-toolbar button i {
  color: #0b1415;
}

.builder .EasyMDEContainer .editor-toolbar button.active {
  background: rgba(60, 255, 150, 0.15);
  color: #064438;
}

.builder-field input:focus,
.builder-field textarea:focus,
.builder-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(60, 255, 150, 0.2);
}

.builder-field small {
  color: var(--muted);
  font-size: 0.75rem;
}

.file-drop {
  position: relative;
  width: min(100%, 520px);
  margin: 0 auto;
  min-height: 140px;
  border: 1px dashed rgba(60, 255, 150, 0.45);
  border-radius: 12px;
  background: radial-gradient(circle at top, rgba(5, 40, 35, 0.65), rgba(1, 12, 15, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-drop-message {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.file-drop-message strong {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.file-drop-message small {
  font-size: 0.75rem;
  color: rgba(214, 255, 246, 0.8);
}

.file-drop[data-state='filled'] {
  border-color: var(--accent);
  background: rgba(60, 255, 150, 0.08);
  box-shadow: 0 0 20px rgba(60, 255, 150, 0.25);
}

.file-drop.is-dragover,
.file-drop:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(60, 255, 150, 0.35);
  background: rgba(60, 255, 150, 0.12);
}

.file-drop--compact {
  min-height: 110px;
  padding: 1rem;
}

.checkbox-group {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem;
  border: 1px dashed rgba(60, 255, 150, 0.35);
  border-radius: 8px;
  background: rgba(1, 12, 15, 0.6);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--muted);
}

.checkbox input[type="checkbox"] {
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid rgba(60, 255, 150, 0.6);
  border-radius: 4px;
  background: rgba(1, 12, 15, 0.85);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.checkbox input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px rgba(60, 255, 150, 0.3);
}

.checkbox input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(60, 255, 150, 0.35);
}

.checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.1rem;
  width: 0.35rem;
  height: 0.7rem;
  border: 2px solid #021109;
  border-width: 0 0.2rem 0.2rem 0;
  transform: rotate(45deg);
}

.builder-banner-preview {
  margin-top: 0.6rem;
  border: 1px dashed rgba(60, 255, 150, 0.35);
  border-radius: 8px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  background: rgba(1, 12, 15, 0.6);
}

.banner-preview-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.builder-banner-preview img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 6px;
  border: 1px solid rgba(60, 255, 150, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.builder-banner-preview .banner-meta {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.banner-empty {
  color: var(--muted);
  font-size: 0.85rem;
}

.builder-banner-actions {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.builder-token-input {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.4rem;
  background: rgba(1, 12, 15, 0.85);
  border: 1px dashed rgba(60, 255, 150, 0.35);
  border-radius: 6px;
  min-height: 48px;
}

.builder-token-input input {
  flex: 1;
  border: none;
  background: transparent;
  min-width: 140px;
  padding: 0.4rem;
  color: var(--text);
}

.builder-token-input input:focus {
  outline: none;
}

.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.keyword-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.keyword-suggestions[data-empty='true'] {
  display: none;
}

.keyword-suggestion {
  border: 1px dashed rgba(60, 255, 150, 0.4);
  background: rgba(60, 255, 150, 0.08);
  color: var(--accent);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

.keyword-suggestion:hover {
  border-color: var(--accent);
  background: rgba(60, 255, 150, 0.2);
}

.token-chip {
  background: rgba(60, 255, 150, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.token-chip span {
  font-size: 0.95rem;
  line-height: 1;
}


.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
}



.builder-preview-frame {
  border: 1px solid rgba(60, 255, 150, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  background: rgba(3, 16, 22, 0.8);
  min-height: 420px;
  overflow: auto;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.35);
}

.builder-preview-frame .content-card {
  margin: 0;
  background: rgba(2, 16, 20, 0.85);
}

.preview-placeholder {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: center;
  min-height: 100%;
}

.preview-progress {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(60, 255, 150, 0.12);
  overflow: hidden;
  margin-bottom: 1.2rem;
}

.preview-progress::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), #39c2ff);
  opacity: 0.35;
}

.post-banner--empty {
  border: 1px dashed rgba(60, 255, 150, 0.3);
  border-radius: 12px;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

.builder-raw {
  margin-top: 1.2rem;
  border: 1px solid rgba(60, 255, 150, 0.2);
  border-radius: 10px;
  background: rgba(2, 12, 14, 0.85);
  overflow: hidden;
}

.builder-raw summary {
  cursor: var(--cursor-base);
  padding: 0.75rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 0.8rem;
}

.builder-raw[open] summary {
  border-bottom: 1px solid rgba(60, 255, 150, 0.2);
}

.builder-raw pre {
  margin: 0;
  min-height: 200px;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 0;
}

.builder-status {
  font-size: 0.9rem;
  margin: 1.2rem 0 0.8rem;
  padding: 0.65rem 0.95rem;
  border-left: 3px solid var(--accent-soft);
}

.builder-status[data-tone="ready"] {
  color: var(--accent);
  border-color: var(--accent);
}

.builder-status[data-tone="success"] {
  color: #7dffcf;
  border-color: #7dffcf;
}

.builder-status[data-tone="warn"] {
  color: var(--danger);
  border-color: var(--danger);
}

/* Admin Utilities */
.admin-console {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.admin-console-header h1 {
  margin-bottom: 0.4rem;
}

.admin-links,
.homelab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.admin-card,
.homelab-card {
  background: rgba(2, 16, 20, 0.9);
  border: 1px solid rgba(60, 255, 150, 0.25);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.admin-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0;
}

.admin-card h2,
.homelab-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.admin-card p,
.homelab-card p {
  margin: 0;
  color: #c1fff2;
}

.admin-card .btn,
.homelab-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.homelab-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: auto;
  flex-wrap: wrap;
}

.homelab-actions .btn {
  margin-top: 0;
}

.admin-tool .prompt + h1 {
  margin-top: 0.4rem;
}

.admin-tool-body {
  display: grid;
  gap: 1.2rem;
}

.admin-tool-output {
  min-height: 160px;
  border: 1px dashed rgba(60, 255, 150, 0.35);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(1, 12, 15, 0.6);
  overflow-x: auto;
}

.admin-tool-output pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Archive Page */
.archive {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.archive-header h1 {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

.archive-description {
  color: var(--muted);
  max-width: 60ch;
}

.archive-controls {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.archive-filter-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.archive-filter-input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(60, 255, 150, 0.3);
  background: rgba(2, 16, 20, 0.8);
  color: var(--text);
  font-family: var(--font-stack);
}

.archive-tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-chip {
  border: 1px solid rgba(60, 255, 150, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-stack);
  text-transform: lowercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.tag-chip.active {
  background: rgba(60, 255, 150, 0.2);
  color: #0b1614;
  border-color: var(--accent);
}

.archive-results {
  display: grid;
  gap: 1rem;
}

.archive-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--accent-soft);
  border-radius: 12px;
  padding: 1.25rem;
  background: rgba(3, 16, 20, 0.9);
}

.archive-card-title {
  margin: 0.2rem 0;
}

.archive-card-excerpt {
  margin: 0;
  color: #c1fff2;
}

.archive-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.archive-card .tag {
  background: rgba(60, 255, 150, 0.1);
}

.archive-empty {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .archive-card {
    padding: 1rem;
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .site-main {
    padding: 2.5rem 1.2rem 3rem;
  }

  .terminal-grid {
    padding: 1.2rem;
  }

  .hero {
    padding: 1.5rem;
  }

  .hero h1 {
    font-size: 1.9rem;
    line-height: 1.3;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn,
  .hero-actions .btn.secondary {
    width: 100%;
    text-align: center;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .post-card {
    padding: 1.2rem;
  }

  .builder-grid {
    grid-template-columns: 1fr;
  }

  .builder-panel {
    padding: 1.25rem;
  }

  .builder-token-input {
    min-height: 56px;
  }

  .builder-banner-preview {
    min-height: 160px;
  }
}
