/* Shared identity derived from the project's original artwork. */
body { background: #151813; }
body::before { content: ''; position: fixed; inset: 0; background: url('/assets/heritage/pattern.webp') center top / 850px; opacity: .028; pointer-events: none; z-index: -1; }
body > main { min-height: 55vh; }
.site-header { background: #151813f7; border-bottom-color: #55513a; }
.desktop-nav a[aria-current]::after { background: var(--olive); }
.header-inner { gap: 22px; }
.header-actions { gap: 10px; }
.desktop-nav { gap: 23px; }
.notebook-link { padding-left: 15px; }
.menu-toggle { display: none; }
.account-link { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 12px; font-weight: 500; border-left: 1px solid var(--line); padding-left: 14px; }
.account-link > span:not(.member-avatar) { max-width: 95px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-avatar { width: 33px; height: 33px; border-radius: 50%; object-fit: cover; border: 1px solid #8f835d; flex-shrink: 0; }
.avatar-initial { display: inline-grid; place-items: center; background: #c9b883; color: #1b2116; font-size: 15px; font-weight: 600; }
.avatar-large { width: 80px; height: 80px; font-size: 30px; }
.hero { gap: 54px; padding-block: 48px 58px; }
.hero-gallery { min-width: 0; display: grid; gap: 18px; }
.heritage-banner { border: 1px solid #6d684c; border-radius: 7px; overflow: hidden; background: #0e100d; }
.heritage-banner img { width: 100%; height: auto; }
.heritage-banner figcaption { border-top: 1px solid #4b4b35; text-align: center; font-size: 8px; color: #d3c9a8; letter-spacing: .18em; padding: 11px; }
.hero-gallery .specimen { border: 1px solid #4f5541; background: linear-gradient(120deg,#293023,#1c2219); }
.hero-gallery .specimen-stage { min-height: 205px; }
.hero-gallery .specimen-image { max-height: 170px; }
.hero-gallery .specimen-orbit { width: 175px; height: 175px; }
.hero-gallery .specimen-bg-number { font-size: 170px; top: 10px; }
.hero-gallery .specimen-coordinate { font-size: 7px; }
.hero-gallery .specimen-bottom h2 { font-size: 28px; }
.hero-gallery .specimen-bottom { padding-top: 16px; }
.hero h1 em { color: #cfbf91; }
.button { color: #191f15; font-weight: 600; }
.button-outline, .button-light { color: var(--olive); }
.button-light { background: #1c2218; border-color: #82866b; }
.button-danger { background: #ddb18e; border-color: #ddb18e; color: #35180f; }
.card-visual, .detail-visual { color: #252c21; }
.card-visual .save-button { color: #333c2c; }
.card-category { color: #2b3325; }
.card-number { color: #4d5345; }
.detail-caption { color: #53594b; }
.card-visual .save-button[aria-pressed=true] { color: #5b5928; }
.comparison-images a { background: var(--surface); border: 1px solid var(--line); }
.comparison-images img { background: var(--card); padding: 18px; border-radius: 4px; mix-blend-mode: normal; }
.mission-strip { background: #20251b; border-color: #424832; }
.history-feature, .quiz-feature, .about-manifesto { border: 1px solid #51533f; }
.history-feature { background: linear-gradient(130deg,#303725,#22281d); }
.quiz-feature { background: linear-gradient(130deg,#3a3226,#29271f); }
.quiz-art span { color: #5f513a; }
.quiz-art i { color: #c59d63; }
.quiz-feature .feature-link { border-color: #635742; }
.about-manifesto { background: #292f22; color: var(--ink); }
.about-manifesto p { color: #c9cbb7; }
input, textarea, select { background: #171c14; border-color: #535b45; }
input::placeholder, textarea::placeholder { color: #adb09f; }
input:focus-visible,textarea:focus-visible,select:focus-visible { outline-offset: 3px; }
input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--olive); flex-shrink: 0; }
input[type=file] { padding: 10px; font-size: 13px; }
input[type=file]::file-selector-button { background: #3a4131; color: #eeeadd; border: 1px solid #737c62; border-radius: 4px; padding: 8px 12px; margin-right: 10px; cursor: pointer; }
.form-errors { background: #392b23; color: #f0d6c4; border-color: #dcaf70; }
.form-errors ul { padding-left: 18px; }
.answer.is-correct { color: #e1edd5; border-color: #a9bb8e; }
.answer.is-wrong { color: #f1d6c4; border-color: #d0a183; }
.card-info h3 a:hover { color: #e6d5a3; }
.timeline-nav a[aria-current]::before { box-shadow: 0 0 0 5px #45402f; }
.timeline-panel .period-art { background: #171c14; color: var(--olive); border: 1px solid #484e3a; }
.search-dialog { background: #20251b; box-shadow: 0 25px 90px #0009; }
.site-footer { background: linear-gradient(#1c2219f7,#1c2219f7),url('/assets/heritage/pattern.webp') center / 850px; }
::selection { background: #cfbf91; color: #161b12; }
.account-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding-block: 25px 35px; align-items: start; }
.account-intro { position: sticky; top: 135px; }
.account-intro .eyebrow { color: var(--orange); margin-bottom: 20px; }
.account-intro h1 { font-size: clamp(45px,4.5vw,65px); }
.account-intro h1 em { color: var(--olive); }
.account-intro > p:not(.eyebrow) { color: var(--muted); margin-top: 25px; line-height: 1.85; }
.account-art { margin-top: 35px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.account-art img { width: 100%; }
.account-art p { padding: 17px; font-size: 11px; color: #c9c2a8; background: #1c2117; }
.account-art .icon { margin-right: 8px; }
.account-panel { padding: 32px; background: #23271f; border: 1px solid #484f3b; border-radius: 8px; min-width: 0; }
.account-panel > .eyebrow { color: var(--orange); margin-bottom: 15px; }
.account-panel h2 { font-size: 31px; margin-bottom: 25px; overflow-wrap: anywhere; }
.page-intro h1 { overflow-wrap: anywhere; }
.stack-form { display: grid; gap: 22px; }
.stack-form input:not([type=checkbox]),.stack-form select,.stack-form textarea { width: 100%; }
.stack-form .button { justify-self: start; }
.check-label { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.field-hint,.fineprint { font-size: 12px; line-height: 1.7; color: var(--muted); }
.field-hint { margin-top: 7px; }
.fineprint a,.account-switch a { text-decoration: underline; text-underline-offset: 3px; }
.account-switch { border-top: 1px solid var(--line); padding-top: 23px; margin-block: 25px 15px; font-size: 13px; }
.account-switch a { color: var(--olive); }
.profile-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.profile-identity { display: flex; gap: 20px; align-items: center; margin-bottom: 25px; min-width: 0; }
.profile-identity > div { min-width: 0; }
.profile-identity h2 { margin: 8px 0 0; }
.profile-facts > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-block: 18px; border-top: 1px solid var(--line); font-size: 13px; }
.profile-facts dt { color: var(--muted); }
.profile-facts dd { overflow-wrap: anywhere; }
.profile-explore { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.profile-explore > .fineprint { grid-column: 1/-1; }
.profile-destination { padding: 25px; }
.profile-destination > .icon { color: var(--olive); width: 28px; height: 28px; margin-bottom: 22px; }
.profile-destination h2 { font-size: 28px; }
.profile-destination p { color: var(--muted); font-size: 13px; }
.logout-form { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.logout-form button { border: 0; background: none; color: var(--muted); }
.workspace-nav { display: flex; align-items: center; gap: 25px; padding-block: 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: 12px; }
.workspace-nav > span { color: var(--olive); font-size: 10px; letter-spacing: .08em; margin-right: auto; }
.workspace-nav .icon { width: 16px; height: 16px; margin-right: 7px; }
.workspace-nav a { padding-block: 8px; }
.workspace-nav a[aria-current] { color: var(--olive); text-decoration: underline; text-underline-offset: 6px; }
.admin-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; margin-block: 0 50px; }
.admin-metrics > div { background: #23271f; border: 1px solid var(--line); border-radius: 6px; padding: 28px; }
.admin-metrics strong { display: block; font: 46px var(--serif); color: var(--olive); margin-bottom: 7px; }
.admin-metrics span { color: var(--muted); font-size: 13px; }
.admin-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin-top: 25px; }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.admin-card > img { width: 100%; height: 190px; object-fit: contain; background: var(--card); padding: 20px; }
.admin-card > div { padding: 23px; }
.admin-card h3 { font-family: var(--serif); font-size: 27px; margin-block: 12px; }
.admin-card p { font-size: 12px; color: var(--muted); }
.admin-card .eyebrow { font-size: 9px; }
.admin-card-actions { display: flex; flex-wrap: wrap; gap: 17px; border-top: 1px solid var(--line); margin-top: 23px; padding-top: 17px; font-size: 12px; }
.admin-card-actions .icon { width: 15px; height: 15px; }
.danger-link { color: #e0b393; }
.admin-search { display: flex; gap: 20px; align-items: end; }
.admin-search > div { flex: 1; }
.admin-search input { width: 100%; }
.editor-form { max-width: 950px; }
.editor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.editor-fields .wide-field { grid-column: 1 / -1; }
.editor-image { max-width: 100%; width: 400px; height: 200px; object-fit: contain; background: var(--card); border-radius: 5px; padding: 20px; }
.delete-panel { max-width: 760px; }
.delete-panel > p { color: var(--muted); }
.stats-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.stats-layout table { table-layout: auto; margin-top: 15px; }
.stats-layout th:first-child { width: auto; }
.stats-layout td,.stats-layout th { padding: 15px 10px; }
.stat-meter { display: block; width: 100%; height: 8px; margin-top: 8px; accent-color: var(--olive); }
@media (hover:hover) and (pointer:fine) {
  .button:hover { background: #dfd0a8; color: #191f15; }
  .button-outline:hover,.button-light:hover { background: #3a4130; color: #eeeadd; }
  .account-link:hover,.workspace-nav a:hover { color: var(--olive); }
  .profile-destination:hover { border-color: #8b8e66; }
}
@media (max-width:1100px) {
  .desktop-nav { gap: 16px; }
  .account-link > span:not(.member-avatar) { display: none; }
  .header-inner { gap: 15px; }
  .hero { gap: 28px; }
  .account-layout { gap: 35px; }
  .profile-explore { grid-template-columns: 1fr; }
}
@media (max-width:820px) {
  .menu-toggle { display: inline-flex; }
  .desktop-nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { max-width: 570px; font-size: 66px; }
  .hero h1 br { display: initial; }
  .hero h1 em { display: inline; }
  .hero h1 .title-asterisk { display: none; }
  .hero-gallery { grid-template-columns: 1fr 1fr; align-items: center; }
  .hero-gallery .specimen-stage { min-height: 170px; }
  .hero-gallery .specimen { padding: 20px; }
  .hero-gallery .specimen-top { flex-wrap: wrap; }
  .hero-gallery .specimen-bottom { flex-wrap: wrap; gap: 10px; }
  .account-layout,.profile-layout,.stats-layout { grid-template-columns: 1fr; gap: 30px; }
  .account-intro { position: static; }
  .account-intro .account-art { max-width: 520px; }
  .account-layout .account-art { display: none; }
  .profile-explore { grid-template-columns: 1fr 1fr; }
  .admin-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workspace-nav { gap: 10px 22px; }
  .workspace-nav > span { flex-basis: 100%; }
  .admin-search { flex-wrap: wrap; }
  .admin-search > div { flex-basis: 100%; }
}
@media (max-width:600px) {
  .header-inner { gap: 7px; }
  .brand { font-size: 21px; gap: 5px; }
  .brand-mark { width: 23px; }
  .brand-mark .icon { width: 23px; }
  .header-actions { gap: 0; }
  .header-actions .icon-button { width: 36px; }
  .notebook-link { padding-inline: 4px; }
  .notebook-link .count-badge { display: none; }
  .account-link { border: 0; padding-inline: 7px; min-width: 38px; }
  .member-avatar { width: 29px; height: 29px; }
  .avatar-large { width: 65px; height: 65px; }
  .hero { padding-block: 30px 35px; }
  .hero h1 { font-size: clamp(48px,12vw,66px); margin-top: 22px; }
  .hero-gallery { grid-template-columns: 1fr; gap: 17px; }
  .heritage-banner figcaption { font-size: 7px; padding: 10px; }
  .hero-gallery .specimen-stage { min-height: 190px; }
  .hero-gallery .specimen-bottom { flex-wrap: nowrap; }
  .hero-actions { gap: 12px; }
  .account-layout { padding-top: 10px; }
  .account-intro h1 { font-size: 45px; }
  .account-panel { padding: 23px; }
  .account-panel h2 { font-size: 28px; }
  .stack-form .button { width: 100%; }
  .profile-explore { grid-template-columns: 1fr; }
  .profile-facts > div { grid-template-columns: 90px 1fr; }
  .profile-identity { gap: 14px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-metrics { gap: 10px; }
  .admin-metrics > div { padding: 18px 12px; }
  .admin-metrics strong { font-size: 35px; }
  .admin-metrics span { font-size: 10px; }
  .admin-search { gap: 12px; }
  .admin-search .button { flex: 1; padding-inline: 12px; }
  .editor-fields { grid-template-columns: 1fr; }
  .stats-layout .account-panel { padding: 18px; }
}
