/* ============================================================
   Architecting Fiction (architecting-fiction.html)
   Methodology essay — prose, callouts, a design-map table, and
   dark code blocks. Uses the site palette / tokens.
   ============================================================ */

.architecting-fiction {
  /* This element also carries .content (width:1000px; max-width:100%).
     Narrow it for reading but keep max-width:100% so it caps to the
     viewport on mobile (otherwise it overflows). */
  width: 820px;
  max-width: 100%;
}

/* ── Title block ───────────────────────────────────────────── */
.architecting-fiction > header {
  text-align: center;
  margin-bottom: 46px;
}

.architecting-fiction h1 {
  font-family: var(--font-display);
  font-size: 2.6em;
  letter-spacing: 0.08em;
  color: var(--heading);
  margin: 0 0 16px;
}

.architecting-fiction .lede {
  font-size: 1.15em;
  line-height: 1.9;
  color: var(--ink);
  margin: 0;
  text-align: left;
}

.architecting-fiction .lede a {
  color: var(--link);
  text-decoration: underline;
}

/* ── Sections & prose ──────────────────────────────────────── */
.architecting-fiction section { margin-bottom: 46px; }

.architecting-fiction h2 {
  font-family: var(--font-display);
  font-size: 1.7em;
  color: var(--heading);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(173, 149, 134, 0.3);
}

.architecting-fiction h3 {
  font-family: var(--font-accent);
  font-size: 1.2em;
  color: var(--brown);
  margin: 28px 0 12px;
}

.architecting-fiction p {
  font-size: 1.05em;
  line-height: 1.95;
  color: var(--ink);
  margin: 0 0 16px;
}

.architecting-fiction ul {
  margin: 0 0 16px;
  padding-left: 1.4em;
}

.architecting-fiction li {
  font-size: 1.05em;
  line-height: 1.9;
  margin-bottom: 12px;
}

.architecting-fiction strong { color: var(--heading); }

.architecting-fiction em {
  font-style: normal;
  font-weight: 600;
  color: var(--brown);
}

/* Inline code */
.architecting-fiction code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  background: rgba(173, 149, 134, 0.16);
  color: var(--ink);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Iron-rule callout ─────────────────────────────────────── */
.architecting-fiction .iron-rule {
  background: rgba(173, 149, 134, 0.1);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0 0;
}

/* ── Poem excerpt ──────────────────────────────────────────── */
.architecting-fiction .excerpt {
  margin: 24px 0;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--accent);
}

.architecting-fiction .excerpt .poem {
  font-family: var(--font-display);
  font-size: 1.2em;
  line-height: 1.95;
  letter-spacing: 0.15em;
  color: var(--brown);
}

/* ── Design-map table ──────────────────────────────────────── */
.architecting-fiction .design-map {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.98em;
}

.architecting-fiction .design-map th,
.architecting-fiction .design-map td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border: 1px solid rgba(173, 149, 134, 0.3);
  line-height: 1.7;
}

.architecting-fiction .design-map th {
  background: var(--cream);
  font-family: var(--font-accent);
  color: var(--heading);
}

.architecting-fiction .design-map td:first-child {
  width: 42%;
  color: var(--muted);
}

/* ── Dark code blocks (ERD demo + skill snippets) ──────────── */
.architecting-fiction pre {
  background: #1e1e1e;
  border-radius: 10px;
  padding: 22px 24px;
  overflow-x: auto;
  margin: 0 0 16px;
}

.architecting-fiction pre code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  line-height: 1.7;
  color: #d4c8be;
  background: none;
  padding: 0;
  white-space: pre;
}

/* ── Full-ERD link ─────────────────────────────────────────── */
.architecting-fiction .erd-link {
  margin-top: 4px;
}

.architecting-fiction .erd-link a {
  display: inline-block;
  font-family: var(--font-accent);
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  transition: transform 0.2s;
}

.architecting-fiction .erd-link a:hover {
  transform: translateX(3px);
  text-decoration: underline;
}

/* ── Experiment note (afterword) ───────────────────────────── */
.architecting-fiction .experiment-note {
  margin-top: 48px;
  padding: 22px 26px;
  background: rgba(173, 149, 134, 0.08);
  border: 1px dashed rgba(173, 149, 134, 0.5);
  border-radius: 10px;
}

.architecting-fiction .experiment-note p {
  margin: 0;
  font-size: 0.98em;
  font-style: italic;
  color: var(--muted);
}

/* ── Back link ─────────────────────────────────────────────── */
.architecting-fiction .af-back {
  margin-top: 36px;
}

.architecting-fiction .af-back a {
  font-family: var(--font-accent);
  font-size: 0.95em;
  color: var(--accent);
  text-decoration: none;
}

.architecting-fiction .af-back a:hover { text-decoration: underline; }

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .architecting-fiction h1 { font-size: 2em; }
  .architecting-fiction h2 { font-size: 1.4em; }
  .architecting-fiction .lede { font-size: 1.05em; }
  .architecting-fiction p,
  .architecting-fiction li { font-size: 1em; }

  /* Stack the two-column design map into labelled blocks */
  .architecting-fiction .design-map,
  .architecting-fiction .design-map tbody,
  .architecting-fiction .design-map tr,
  .architecting-fiction .design-map td { display: block; width: 100% !important; }

  .architecting-fiction .design-map thead { display: none; }

  .architecting-fiction .design-map tr {
    margin-bottom: 14px;
    border: 1px solid rgba(173, 149, 134, 0.3);
    border-radius: 8px;
    overflow: hidden;
  }

  .architecting-fiction .design-map td {
    border: none;
    border-bottom: 1px solid rgba(173, 149, 134, 0.2);
  }

  .architecting-fiction .design-map td:last-child { border-bottom: none; }

  .architecting-fiction .design-map td:first-child {
    background: var(--cream);
    color: var(--heading);
    font-weight: 600;
  }

  .architecting-fiction pre code { font-size: 0.8em; }

  .architecting-fiction .excerpt .poem {
    font-size: 1.05em;
    letter-spacing: 0.08em;
  }
}
