/* ============================================================
   NOTE PROSE
   Loaded by the shell (for .txt/.md rendered in place) and by
   sandboxed .html note frames. Contains no window chrome and no
   viewport breakpoints tied to the browser window — a note is
   sized by its column, not by the screen.
   ============================================================ */

.note {
  padding: 34px 44px 60px;
  max-width: 74ch;
  margin: 0 auto;
}

/* ---------- hero header ----------
   Square mark on the left, title block on the right. Stacks with the
   mark on top once the reading column gets narrow. */

.note-hero {
  display: flex;
  align-items: center;
  gap: 26px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 24px;
  margin-bottom: 30px;
}

.hero-art {
  flex: none;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  color: var(--ink);          /* marks render black, not accented */
}

.hero-art.is-mark { padding: 22px; }

.hero-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-text { min-width: 0; }

.note-eyebrow {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-deep);
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.note-h1 {
  font-family: var(--ui);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--ink);
}

.note-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-light);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid rgba(0, 169, 196, 0.35);
  border-radius: 999px;
  color: var(--cyan-deep);
  background: rgba(0, 169, 196, 0.07);
}

.note-body {
  font-family: var(--prose);
  font-size: 16px;
  line-height: 1.68;
  color: var(--ink);
}

.note-body > *:first-child { margin-top: 0; }

.note-body .lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-mid);
}

.note-body h2 {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--cyan-deep);
  margin: 40px 0 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rule);
}

.note-body h3 {
  font-family: var(--ui);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 28px 0 8px;
  color: var(--ink);
}

.note-body h4 {
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  margin: 22px 0 6px;
  color: var(--ink-mid);
}

.note-body p { margin: 0 0 17px; }

.note-body a {
  color: var(--cyan-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.note-body a:hover { background: rgba(11, 224, 255, 0.18); }

.note-body ul, .note-body ol { margin: 0 0 18px; padding-left: 22px; }
.note-body li { margin-bottom: 7px; }
.note-body li::marker { color: var(--cyan); }

.note-body blockquote {
  margin: 0 0 18px;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--cyan);
  color: var(--ink-mid);
  font-style: italic;
}

.note-body code {
  font-family: var(--mono);
  font-size: 0.855em;
  background: rgba(12, 27, 36, 0.06);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1px 5px;
}

.note-body pre {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  background: #0C1B24;
  color: #D6E6EC;
  border-radius: var(--radius-sm);
  padding: 15px 17px;
  overflow-x: auto;
  margin: 0 0 20px;
  border: 1px solid rgba(12, 27, 36, 0.4);
}

.note-body pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.note-body hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 32px 0;
}

.note-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ui);
  font-size: 13.5px;
  margin: 0 0 20px;
}

.note-body th {
  text-align: left;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  border-bottom: 1px solid var(--rule-strong);
  padding: 7px 10px 7px 0;
}

.note-body td {
  border-bottom: 1px solid var(--rule);
  padding: 9px 10px 9px 0;
  vertical-align: top;
}

/* Callouts — write directly in .html, or use `> [!note]` in .md */
.callout {
  border-left: 2px solid var(--cyan);
  background: rgba(0, 169, 196, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 13px 16px;
  margin: 0 0 20px;
  font-size: 14.5px;
}

.callout.warn { border-left-color: var(--amber); background: rgba(198, 129, 26, 0.07); }

.callout-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cyan-deep);
  display: block;
  margin-bottom: 5px;
}

.callout.warn .callout-label { color: var(--amber); }

.note-loading, .note-error {
  padding: 60px 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-light);
}

.note-error { color: var(--amber); }

/* Narrow column — a genuinely cramped reading width, not a phone guess. */
@media (max-width: 560px) {
  .note { padding: 24px 20px 48px; }
  .note-h1 { font-size: 24px; }
  .note-body { font-size: 15.5px; }
  .note-body .lede { font-size: 16.5px; }

  .note-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 20px;
    margin-bottom: 24px;
  }

  .hero-art { width: 104px; height: 104px; }
  .hero-art.is-mark { padding: 17px; }
}

/* ---------- desktop-only notice ----------
   Appended automatically to a note that shares its name with an app in the
   same folder, and only on layouts where apps are hidden. */

.app-note-footer {
  margin-top: 40px;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(198, 129, 26, 0.06);
}

.app-note-label {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 7px;
}

.app-note-footer p {
  margin: 0;
  font-family: var(--prose);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-mid);
}

.app-note-footer em { font-style: normal; font-weight: 600; color: var(--ink); }
