/* ordinary engineering — open-door portal
   Design language: washed-out monochrome ink-sketch on paper. The only
   category signal is the accent hue (WebExploitation), everything else is
   near-black ink on warm off-white paper. Hand-drawn chrome is provided by
   the drawably vendor stylesheet. */

:root {
  --paper: #f6f1e7;
  --paper-2: #efe9db;
  --ink: #26211b;
  --ink-soft: #6e675f;
  --accent: #3a4a8f;   /* WebExploitation category accent */
  --accent-wash: #dfe4f2;
  --danger: #b3442f;
  --shadow: 3px 3px 0 rgba(38, 33, 27, 0.14);
  --drawably-stroke: var(--accent);
  --drawably-fill: var(--accent);
  --drawably-paper: var(--paper);
  --drawably-width: 2;
}

* { box-sizing: border-box; }

/* author display rules (flex/inline-block) must never defeat the hidden attr */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 12%, var(--accent-wash) 0, transparent 34%),
    var(--paper);
}

.drawably-host { color: var(--ink); }

.shell {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.shell.wide { max-width: 1120px; }

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.brand {
  font: 600 15px/1 Geist Mono, ui-monospace, monospace;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.brand span { color: var(--accent); }
.brand.sub {
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.12em;
}

.intro {
  max-width: 860px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 26px;
}
.intro b { color: var(--accent); }

.cols {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border-radius: 4px;
  padding: 26px 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(38, 33, 27, 0.12);
}

h1 { font-size: 22px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
p  { line-height: 1.55; font-size: 14.5px; }
.about p { font-size: 13.5px; }
.muted { color: var(--ink-soft); font-size: 13px; }
.mono { font-family: Geist Mono, ui-monospace, monospace; font-size: 13px; }

.rule { border: 0; height: 10px; margin: 14px 0 18px; }

/* ---- form ---- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.inputwrap {
  display: block;
  background: #fffdf7;
  border: 1px solid rgba(38, 33, 27, 0.22);
  border-radius: 3px;
}
.inputwrap input,
.inputwrap textarea {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
  resize: vertical;
}

.drawably-btn {
  display: inline-block;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  color: var(--accent);
  padding: 7px 16px;
  border-radius: 3px;
  transition: transform 120ms ease, background 120ms ease;
}
.drawably-btn:hover { transform: translateY(-1px); }
.drawably-btn:active { transform: translateY(1px); }
.drawably-btn.solid { background: var(--accent); color: var(--paper); box-shadow: var(--shadow); }
.drawably-btn:disabled { opacity: 0.5; cursor: progress; }

.counter { margin-left: 12px; font-size: 12px; }

/* ---- reply card (desk stationery) ---- */
.replycard {
  margin-top: 22px;
  padding: 16px 18px 12px;
  background: #fffdf7;
  border: 1px dashed rgba(58, 74, 143, 0.5);
  border-radius: 3px;
}
.replyhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.replytitle {
  font: 600 11px/1 Geist Mono, ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.stamp {
  display: inline-block;
  border: 2px solid #188a42;
  color: #188a42;
  font: 700 11px/1 Geist Mono, ui-monospace, monospace;
  letter-spacing: 0.22em;
  padding: 3px 7px;
  border-radius: 3px;
  transform: rotate(-3deg);
}
.stamp.small { margin-left: 10px; }

/* thinking: three boiling ink dots */
.thinking {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 0 14px;
}
.think-dot {
  width: 9px;
  height: 9px;
  border: 1.6px solid var(--accent);
  background: var(--accent-wash);
  animation: boil 0.9s infinite ease-in-out;
}
.think-dot:nth-child(2) { animation-delay: 0.18s; }
.think-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes boil {
  0%   { border-radius: 58% 42% 55% 45%; transform: translateY(0) rotate(0deg); }
  33%  { border-radius: 42% 58% 40% 60%; transform: translateY(-2px) rotate(8deg); }
  66%  { border-radius: 60% 40% 58% 42%; transform: translateY(1px) rotate(-6deg); }
  100% { border-radius: 55% 45% 48% 52%; transform: translateY(0) rotate(0deg); }
}
.thinkstatus { margin-left: 6px; font-size: 13px; font-style: italic; }

/* markdown-rendered reply content */
.md { font-size: 14.5px; line-height: 1.6; }
.md p { margin: 8px 0; }
.md blockquote {
  margin: 10px 0;
  padding: 6px 14px;
  border-left: 2px dashed var(--accent);
  color: var(--ink-soft);
  font-style: italic;
  background: rgba(58, 74, 143, 0.05);
}
.md blockquote p { margin: 4px 0; }
.md pre {
  background: var(--paper-2);
  border: 1px dashed rgba(38, 33, 27, 0.35);
  border-radius: 3px;
  padding: 10px 12px;
  overflow-x: auto;
  font: 500 13px/1.5 Geist Mono, ui-monospace, monospace;
  margin: 10px 0;
}
.md code {
  font: 500 12.5px/1.4 Geist Mono, ui-monospace, monospace;
  background: var(--paper-2);
  border-radius: 2px;
  padding: 1px 5px;
}
.md pre code { background: none; padding: 0; }
.md img { max-width: 100%; }
.md h3 { font-size: 15px; margin: 12px 0 4px; }
.md a { color: var(--accent); }

#replyquote { border-bottom: 1px dashed rgba(38, 33, 27, 0.18); padding-bottom: 4px; margin-bottom: 6px; }

/* the stapled delivery receipt */
.receipt {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--accent);
  font-size: 13px;
}
.receipt blockquote { background: rgba(24, 138, 66, 0.06); border-left-color: #188a42; }
.receipt .md, .receipt p { font-size: 13px; }

.replymeta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(38, 33, 27, 0.18);
  font: 400 11px/1.5 Geist Mono, ui-monospace, monospace;
  letter-spacing: 0.02em;
}

.smallprint { margin-top: 14px; font-size: 12px; color: var(--ink-soft); }

/* ---- ledger ---- */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li {
  position: relative;
  padding: 9px 0 9px 22px;
  font-size: 14px;
  line-height: 1.45;
  border-bottom: 1px dashed rgba(38, 33, 27, 0.16);
}
.ledger li:last-child { border-bottom: 0; }
.ledger li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 16px;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
}
.ledger .what { color: var(--ink); overflow-wrap: anywhere; }
.ledger li.fresh { animation: settle 700ms ease-out; }
@keyframes settle {
  from { background: var(--accent-wash); }
  to   { background: transparent; }
}
.footnote { margin-top: 10px; font-size: 12px; }

.about { margin-top: 20px; }

.foot {
  margin-top: 26px;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .drawably-btn { transition: none; }
  .stamp { transform: none; }
  .think-dot { animation: none; }
  .ledger li.fresh { animation: none; }
}
