/* Tessa Restoration Lab — theme.css
   Thesis: an art-conservation lab / museum archive for websites.
   Scope: body.theme-restoration-lab. No inline styles anywhere. */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=Courier+Prime:wght@400;700&display=swap');

.theme-restoration-lab {
  --cream: #F3EBDD;
  --cream-deep: #E8DCC6;
  --paper: #FBF6EC;
  --navy: #1F2A44;
  --navy-deep: #151D31;
  --red: #C8553D;
  --brass: #B08D57;
  --brass-soft: #D9C29A;
  --ink: #1F2A44;
  --muted: #5B6377;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-mono: 'Courier Prime', 'Courier New', monospace;
  --rule: 1px solid rgba(31, 42, 68, 0.18);
  --radius: 2px;
  --shadow: 0 1px 0 rgba(31,42,68,.08), 0 10px 28px -16px rgba(31,42,68,.35);
  margin: 0;
  background: var(--cream);
  background-image:
    linear-gradient(rgba(31,42,68,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,42,68,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.theme-restoration-lab *, .theme-restoration-lab *::before, .theme-restoration-lab *::after { box-sizing: border-box; }
.theme-restoration-lab a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.theme-restoration-lab a:hover { color: var(--navy); }
.theme-restoration-lab :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.theme-restoration-lab img { max-width: 100%; height: auto; display: block; }
.theme-restoration-lab h1, .theme-restoration-lab h2, .theme-restoration-lab h3 {
  font-family: var(--font-display); color: var(--navy); font-weight: 600; line-height: 1.1; letter-spacing: -0.005em; margin: 0 0 .5em;
}
.theme-restoration-lab h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.theme-restoration-lab h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.theme-restoration-lab h3 { font-size: 1.45rem; }
.theme-restoration-lab p { margin: 0 0 1em; }
.theme-restoration-lab code, .theme-restoration-lab .mono { font-family: var(--font-mono); font-size: .88em; }

/* Skip link */
.theme-restoration-lab .skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: var(--cream); padding: .5rem 1rem; z-index: 50; }
.theme-restoration-lab .skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Chrome ---------- */
.theme-restoration-lab .lab-chrome { background: var(--navy); color: var(--cream); border-bottom: 4px double var(--brass); }
.theme-restoration-lab .lab-chrome-inner { max-width: 1200px; margin: 0 auto; padding: 1.1rem 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.theme-restoration-lab .brand-lockup { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--cream); }
.theme-restoration-lab .avatar-face { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; border: 2px solid var(--brass); background: var(--cream); flex: none; }
.theme-restoration-lab .avatar-face img { width: 100%; height: 100%; object-fit: cover; }
.theme-restoration-lab .avatar-face-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.7rem; font-style: italic; color: var(--navy); }
.theme-restoration-lab .brand-name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: 0; line-height: 1; color: var(--cream); }
.theme-restoration-lab .brand-tag { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-soft); margin: .3rem 0 0; }
.theme-restoration-lab .lab-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.3rem; font-family: var(--font-mono); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.theme-restoration-lab .lab-nav a { color: var(--cream); text-decoration: none; padding: .25rem 0; border-bottom: 1px solid transparent; }
.theme-restoration-lab .lab-nav a:hover { color: var(--brass-soft); border-bottom-color: var(--brass); }
.theme-restoration-lab .lab-nav .nav-hq { color: var(--brass-soft); }

/* Condition report ticker */
.theme-restoration-lab .condition-ticker { background: var(--paper); color: var(--navy); border-top: 1px solid var(--brass); font-family: var(--font-mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; overflow: hidden; white-space: nowrap; }
.theme-restoration-lab .condition-ticker-track { display: inline-flex; gap: 3rem; padding: .5rem 0; animation: lab-ticker 48s linear infinite; }
.theme-restoration-lab .condition-ticker-track span::before { content: "\25A0  "; color: var(--red); }
.theme-restoration-lab .ticker-label { color: var(--red); font-weight: 700; }
@keyframes lab-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .theme-restoration-lab .condition-ticker-track { animation: none; } }

/* ---------- Page grid ---------- */
.theme-restoration-lab .lab-page { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.theme-restoration-lab .lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; margin-top: 2.5rem; }
@media (max-width: 900px) { .theme-restoration-lab .lab-grid { grid-template-columns: 1fr; } }
.theme-restoration-lab .keel-region:empty, .theme-restoration-lab .lab-main:has(> :empty:only-child) { display: none; }

/* Accession labels */
.theme-restoration-lab .accession { display: inline-block; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); border: 1px solid var(--navy); padding: .2rem .55rem; background: var(--paper); margin-bottom: 1rem; }
.theme-restoration-lab .accession-red { color: var(--red); border-color: var(--red); }

/* ---------- Hero ---------- */
.theme-restoration-lab .hero { position: relative; background: var(--paper); border: var(--rule); box-shadow: var(--shadow); padding: clamp(2rem, 5vw, 4rem); }
.theme-restoration-lab .hero::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--brass-soft); pointer-events: none; }
.theme-restoration-lab .hero-kicker { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: 1rem; }
.theme-restoration-lab .hero h1 em { font-style: italic; color: var(--red); }
.theme-restoration-lab .hero-lede { font-size: 1.25rem; max-width: 40em; color: var(--muted); }
.theme-restoration-lab .hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; position: relative; }
.theme-restoration-lab .hero-stamp { position: absolute; right: clamp(1rem, 4vw, 3rem); top: clamp(1rem, 4vw, 2.5rem); transform: rotate(-8deg); font-family: var(--font-mono); font-weight: 700; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--red); border: 2px solid var(--red); padding: .4rem .7rem; opacity: .85; }
@media (max-width: 700px) { .theme-restoration-lab .hero-stamp { position: static; display: inline-block; margin-bottom: 1rem; } }

/* Buttons (incl. native) */
.theme-restoration-lab .btn, .theme-restoration-lab .button, .theme-restoration-lab .keel-form__submit, .theme-restoration-lab .keel-form button[type="submit"] {
  display: inline-block; font-family: var(--font-mono); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; padding: .8rem 1.3rem; border: 1.5px solid var(--navy); border-radius: var(--radius); cursor: pointer; transition: background .15s, color .15s;
}
.theme-restoration-lab .btn-red, .theme-restoration-lab .button, .theme-restoration-lab .keel-form__submit, .theme-restoration-lab .keel-form button[type="submit"] { background: var(--red); border-color: var(--red); color: var(--paper); }
.theme-restoration-lab .btn-red:hover, .theme-restoration-lab .button:hover, .theme-restoration-lab .keel-form__submit:hover { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.theme-restoration-lab .btn-ghost { background: transparent; color: var(--navy); }
.theme-restoration-lab .btn-ghost:hover { background: var(--navy); color: var(--paper); }

/* ---------- Content components ---------- */
.theme-restoration-lab .lead { font-size: 1.2rem; color: var(--muted); }
.theme-restoration-lab .panel { background: var(--paper); border: var(--rule); padding: 2rem; margin: 0 0 2rem; box-shadow: var(--shadow); }
.theme-restoration-lab .panel-navy { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.theme-restoration-lab .panel-navy h2, .theme-restoration-lab .panel-navy h3 { color: var(--cream); }
.theme-restoration-lab .panel-navy a { color: var(--brass-soft); }
.theme-restoration-lab .rule-brass { border: 0; border-top: 1px solid var(--brass); margin: 2.5rem 0; position: relative; }

/* Specimen cards (treatments, case files) */
.theme-restoration-lab .specimen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin: 1.5rem 0 2rem; padding: 0; list-style: none; }
.theme-restoration-lab .specimen { background: var(--paper); border: var(--rule); border-top: 3px solid var(--navy); padding: 1.4rem 1.4rem 1.2rem; position: relative; }
.theme-restoration-lab .specimen:nth-child(3n+2) { border-top-color: var(--red); }
.theme-restoration-lab .specimen:nth-child(3n) { border-top-color: var(--brass); }
.theme-restoration-lab .specimen-no { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; margin-bottom: .5rem; }
.theme-restoration-lab .specimen p:last-child { margin-bottom: 0; }

/* Condition report table */
.theme-restoration-lab .condition-report { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1rem 0 1.5rem; background: var(--paper); }
.theme-restoration-lab .condition-report th, .theme-restoration-lab .condition-report td { text-align: left; padding: .7rem .8rem; border-bottom: var(--rule); vertical-align: top; }
.theme-restoration-lab .condition-report th { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); background: var(--cream-deep); font-weight: 700; }
.theme-restoration-lab .status-red { color: var(--red); font-family: var(--font-mono); font-size: .85em; }
.theme-restoration-lab .status-ok { color: var(--navy); font-family: var(--font-mono); font-size: .85em; }

/* Process steps */
.theme-restoration-lab .treatment-steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.theme-restoration-lab .treatment-steps > li { counter-increment: step; position: relative; padding: 1.5rem 1.5rem 1.5rem 5.2rem; background: var(--paper); border: var(--rule); margin-bottom: 1rem; }
.theme-restoration-lab .treatment-steps > li::before { content: "0" counter(step); position: absolute; left: 1.3rem; top: 1.2rem; font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--red); line-height: 1; }
.theme-restoration-lab .diff-meter { font-family: var(--font-mono); background: var(--navy); color: var(--cream); padding: .9rem 1.1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.theme-restoration-lab .diff-meter strong { color: var(--brass-soft); }

/* Callouts / notes */
.theme-restoration-lab .conservator-note { border-left: 3px solid var(--red); background: var(--paper); padding: 1.2rem 1.4rem; font-style: italic; margin: 0 0 2rem; }
.theme-restoration-lab .conservator-note p:last-child { margin: 0; }
.theme-restoration-lab .hq-banner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem 1.5rem; border: 1px dashed var(--brass); padding: 1rem 1.3rem; margin: 0 0 2rem; font-family: var(--font-mono); font-size: .85rem; }
.theme-restoration-lab .hq-banner p { margin: 0; }

/* Avatar panel (About) */
.theme-restoration-lab .avatar-panel { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 700px) { .theme-restoration-lab .avatar-panel { grid-template-columns: 1fr; } }
.theme-restoration-lab .avatar-panel-frame { background: var(--cream-deep); padding: 14px; border: 6px solid var(--brass); outline: 1px solid var(--navy); outline-offset: -12px; }
.theme-restoration-lab .avatar-panel-frame img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.theme-restoration-lab .avatar-caption { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: .7rem; }

/* Aside rail */
.theme-restoration-lab .aside-card { background: var(--paper); border: var(--rule); padding: 1.3rem; margin-bottom: 1.25rem; font-size: .95rem; }
.theme-restoration-lab .aside-card h3 { font-size: 1.2rem; }
.theme-restoration-lab .aside-card.navy { background: var(--navy); color: var(--cream); }
.theme-restoration-lab .aside-card.navy h3 { color: var(--brass-soft); }
.theme-restoration-lab .aside-card.navy a { color: var(--brass-soft); }
.theme-restoration-lab .tag-row { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dotted rgba(31,42,68,.3); padding: .35rem 0; font-family: var(--font-mono); font-size: .8rem; }
.theme-restoration-lab .tag-row span:last-child { color: var(--red); text-align: right; }

/* Region footer note */
.theme-restoration-lab .region-footer { max-width: 1200px; margin: 0 auto; padding: 1.2rem 1.5rem; font-family: var(--font-mono); font-size: .8rem; color: var(--brass-soft); border-bottom: 1px solid rgba(176,141,87,.35); }

/* Native form slot + form hooks */
.theme-restoration-lab .form-slot-note { border: 2px dashed var(--red); padding: 1.2rem; background: var(--cream); margin: 1.5rem 0; font-family: var(--font-mono); font-size: .85rem; }
.theme-restoration-lab .keel-form { background: var(--paper); border: var(--rule); padding: 1.6rem; }
.theme-restoration-lab .keel-field { margin-bottom: 1.1rem; }
.theme-restoration-lab .keel-form label { display: block; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .35rem; color: var(--navy); }
.theme-restoration-lab .keel-form input, .theme-restoration-lab .keel-form select, .theme-restoration-lab .keel-form textarea { width: 100%; font: inherit; font-size: 1rem; padding: .7rem .8rem; border: 1px solid rgba(31,42,68,.35); border-radius: var(--radius); background: #fff; color: var(--ink); }
.theme-restoration-lab .keel-form input:focus, .theme-restoration-lab .keel-form select:focus, .theme-restoration-lab .keel-form textarea:focus { outline: 2px solid var(--brass); border-color: var(--brass); }

/* Native block hooks */
.theme-restoration-lab .keel-block--heading { margin-top: 1rem; }
.theme-restoration-lab .keel-block--quote, .theme-restoration-lab blockquote { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; border-left: 3px solid var(--brass); padding-left: 1.2rem; margin: 1.5rem 0; color: var(--navy); }

/* ---------- Footer ---------- */
.theme-restoration-lab .lab-footer { background: var(--navy-deep); color: var(--cream); border-top: 4px double var(--brass); }
.theme-restoration-lab .lab-footer-inner { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
@media (max-width: 800px) { .theme-restoration-lab .lab-footer-inner { grid-template-columns: 1fr; } }
.theme-restoration-lab .footer-brand { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; margin: 0 0 .4rem; }
.theme-restoration-lab .footer-joke { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; color: var(--brass-soft); }
.theme-restoration-lab .footer-meta { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(243,235,221,.65); }
.theme-restoration-lab .footer-links { display: flex; flex-direction: column; gap: .5rem; font-family: var(--font-mono); font-size: .85rem; }
.theme-restoration-lab .footer-links a { color: var(--cream); text-decoration: none; }
.theme-restoration-lab .footer-links a:hover { color: var(--brass-soft); }
.theme-restoration-lab .footer-links .footer-hq { color: var(--brass-soft); }