@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600&family=Noto+Serif+SC:wght@500;600;700&display=swap");

:root {
  color: #17372f;
  background: #f8f7f2;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  --paper: #fffdf9;
  --canvas: #f8f7f2;
  --ink: #14382f;
  --muted: #727d76;
  --line: #e6e1d8;
  --rust: #bd563b;
  --rust-soft: #f2e2dc;
  --green-soft: #e6efe8;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, .admin-brand, .login-brand, .public-brand, .content-tabs { font-family: "Noto Serif SC", "SimSun", serif; letter-spacing: 0; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.admin-side { position: fixed; inset: 0 auto 0 0; width: 230px; z-index: 4; background: rgba(255,253,249,.98); border-right: 1px solid var(--line); padding: 23px 15px; }
.admin-brand { display: block; padding: 1px 11px 26px; font-size: 23px; line-height: 1.2; font-weight: 700; color: #0e3029; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-side nav { display: flex; flex-direction: column; gap: 3px; }
.nav-link { min-height: 44px; padding: 0 13px; border-radius: 7px; display: flex; align-items: center; gap: 13px; color: #56635d; font-size: 14px; transition: background .16s ease, color .16s ease; }
.nav-link i { width: 20px; font-size: 19px; text-align: center; flex: 0 0 auto; }
.nav-link:hover { background: #f3f0e9; color: #1c463b; }
.nav-link.active { color: #a84b34; background: var(--rust-soft); font-weight: 600; }
.nav-link small { margin-left: auto; font-size: 10px; color: #9aa09c; }
.nav-link.is-disabled { opacity: .68; cursor: not-allowed; }
.nav-divider { height: 1px; background: #ece8df; margin: 12px 7px; }

.admin-content { grid-column: 2; min-width: 0; }
.admin-topbar { height: 67px; padding: 0 32px 0 47px; background: rgba(255,253,249,.96); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 30px; position: sticky; top: 0; z-index: 3; backdrop-filter: blur(10px); }
.content-tabs { display: flex; align-items: center; gap: 42px; font-size: 18px; font-weight: 600; color: #193c33; }
.top-actions { display: flex; align-items: center; gap: 13px; }
.search-stub { width: 330px; height: 40px; border-radius: 22px; background: #f1efe9; color: #868d88; padding: 0 16px; display: flex; align-items: center; gap: 10px; font-size: 12px; }
.icon-button { border: 0; background: transparent; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #25493f; font-size: 19px; }
.icon-button:hover { background: #f1eee7; }
.user-chip { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #577a69; font-family: "Noto Serif SC", serif; font-weight: 700; }
.admin-main { max-width: 1280px; margin: 0 auto; padding: 34px 42px 50px; }

.dashboard-hero { height: 330px; position: relative; border-radius: 7px; overflow: hidden; border: 1px solid #e2ded4; }
.dashboard-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 51%; }
.hero-wash { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(250,249,244,.98) 0%, rgba(250,249,244,.92) 33%, rgba(250,249,244,.12) 74%); }
.dashboard-hero-copy { position: relative; z-index: 1; padding: 32px 43px; max-width: 600px; }
.dashboard-hero-copy > p { margin: 0 0 12px; color: #66746c; font-size: 13px; }
.dashboard-hero-copy h1 { margin: 0 0 10px; font-size: clamp(32px, 3.15vw, 47px); line-height: 1.22; font-weight: 700; }
.dashboard-hero-copy > span { display: block; color: #65726b; font-size: 14px; margin-bottom: 23px; }
.primary-button, .secondary-button { min-height: 44px; padding: 0 18px; border-radius: 6px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; border: 0; font-weight: 600; }
.primary-button { color: #fff; background: var(--rust); box-shadow: 0 8px 18px rgba(151,68,45,.13); }
.primary-button:hover { background: #a94832; }
.primary-button.compact { min-height: 42px; font-size: 13px; }
.secondary-button { color: #40584e; background: var(--paper); border: 1px solid #dad5cc; font-size: 13px; white-space: nowrap; }
.secondary-button:hover { border-color: #aa4d35; color: #aa4d35; }

.metric-row { margin: 18px 0 30px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.metric-row div { min-height: 92px; padding: 19px 25px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.metric-row div:last-child { border-right: 0; }
.metric-row strong { font: 600 29px/1 "Noto Serif SC", serif; }
.metric-row span { color: var(--muted); font-size: 12px; margin-top: 8px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .65fr); gap: 24px; }
.activity-panel, .quick-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 25px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid #ebe7df; padding-bottom: 18px; }
.section-heading h2, .quick-panel h2 { margin: 3px 0 0; font-size: 25px; line-height: 1.25; }
.eyebrow { margin: 0; color: #a75139; font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.status-badge { color: #3f7054; background: var(--green-soft); border-radius: 14px; padding: 5px 9px; font-size: 11px; white-space: nowrap; }
.status-badge i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; background: #4b7a5e; }
.readiness-list { display: grid; }
.readiness-list > div { min-height: 72px; display: grid; grid-template-columns: 39px 1fr 20px; align-items: center; gap: 10px; border-bottom: 1px solid #efebe4; }
.readiness-list > div:last-child { border-bottom: 0; }
.readiness-list > div > i:first-child { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; background: #f1eee7; font-size: 18px; color: #48665a; }
.readiness-list > div > i:last-child { color: #4c795e; }
.readiness-list span { display: grid; gap: 3px; }
.readiness-list strong { font-size: 14px; }
.readiness-list small { color: #78817c; font-size: 12px; }
.quick-panel { background: #17392f; color: #f9f5eb; position: relative; overflow: hidden; }
.quick-panel:after { content: ""; position: absolute; width: 130px; height: 130px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -56px; bottom: -52px; }
.quick-panel .eyebrow { color: #e5aa92; }
.quick-panel p:not(.eyebrow) { color: #cad6d0; line-height: 1.75; font-size: 13px; }
.quick-panel a { display: inline-flex; align-items: center; gap: 7px; margin-top: 17px; color: #fff; font-size: 13px; font-weight: 600; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 7px 0 25px; border-bottom: 1px solid var(--line); }
.page-heading h1 { font-size: 37px; line-height: 1.2; margin: 5px 0 7px; }
.page-heading div > p:last-child { color: #727d76; margin: 0; font-size: 13px; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(290px, .7fr); gap: 28px; padding-top: 28px; }
.settings-form { background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
.form-section { padding: 26px; border-bottom: 1px solid #ebe7df; }
.form-section > div:first-child { display: flex; gap: 14px; margin-bottom: 23px; }
.step-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #a34b34; background: var(--rust-soft); font: 600 12px/1 "Noto Serif SC", serif; }
.form-section h2 { font-size: 20px; margin: 2px 0 5px; }
.form-section p { color: var(--muted); font-size: 12px; margin: 0; }
.stack-form label, .form-section label { display: grid; gap: 8px; font-size: 13px; font-weight: 600; color: #40574e; }
input { width: 100%; min-height: 46px; border: 1px solid #dcd7ce; border-radius: 5px; background: #fff; color: #17372f; padding: 0 13px; outline: none; }
input:focus { border-color: #9c5a46; box-shadow: 0 0 0 3px rgba(189,86,59,.11); }
label small { font-weight: 400; color: #8a918d; }
.muted-section { background: #fbfaf6; }
.coming-soon { min-height: 60px; margin-bottom: 0 !important; border: 1px dashed #d9d4ca; border-radius: 6px; align-items: center; padding: 13px; color: #69756e; font-size: 12px; }
.coming-soon i { color: #5b7d69; font-size: 19px; }
.form-actions { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 25px; }
.form-actions > span { color: #858d88; font-size: 11px; }
.profile-preview { display: grid; align-content: start; gap: 15px; }
.preview-card { min-height: 285px; position: relative; overflow: hidden; border-radius: 7px; color: #fff; }
.preview-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview-card:after { content: ""; position: absolute; inset: 0; background: rgba(12,42,34,.42); }
.preview-card > div { position: absolute; z-index: 1; inset: auto 22px 22px; }
.preview-card small { font-size: 10px; letter-spacing: .12em; }
.preview-card h2 { margin: 7px 0 5px; font-size: 27px; line-height: 1.25; }
.preview-card p { margin: 0; color: rgba(255,255,255,.83); font-size: 12px; }
.security-note { padding: 16px; background: #edf2ed; border: 1px solid #dce6de; border-radius: 6px; display: flex; gap: 11px; color: #456253; }
.security-note > i { font-size: 20px; flex: 0 0 auto; }
.security-note p { margin: 0; line-height: 1.6; font-size: 12px; }
.logout-form { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.logout-form button { border: 0; background: transparent; color: #a64d37; padding: 7px 0; font-size: 12px; }

.flash { min-height: 44px; border-radius: 6px; padding: 10px 13px; margin: 0 0 18px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.flash-success { background: #e7f0e8; color: #37664a; border: 1px solid #d1e2d4; }
.flash-error { background: #f7e7e2; color: #963f2b; border: 1px solid #edd0c8; }

.login-body { min-height: 100vh; background: #f6f3ed; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(410px, .72fr); }
.login-visual { position: relative; min-height: 100vh; overflow: hidden; }
.login-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-visual:after { content: ""; position: absolute; inset: 0; background: rgba(11,43,34,.26); }
.login-visual-copy { position: absolute; z-index: 1; left: 7vw; right: 7vw; bottom: 8vh; color: #fff; }
.login-visual-copy p { font-size: 11px; letter-spacing: .16em; margin-bottom: 14px; }
.login-visual-copy h1 { font-size: clamp(38px, 4vw, 61px); line-height: 1.22; margin: 0; text-shadow: 0 2px 20px rgba(8,31,24,.2); }
.login-panel { background: var(--paper); padding: 34px clamp(34px, 5vw, 75px); display: flex; flex-direction: column; }
.login-brand { font-size: 23px; font-weight: 700; }
.login-form-wrap { width: 100%; max-width: 400px; margin: auto; }
.login-form-wrap h2 { font-size: 39px; margin: 8px 0; }
.login-lead { color: #747e78; font-size: 14px; margin-bottom: 28px; }
.stack-form { display: grid; gap: 18px; }
.stack-form .primary-button { margin-top: 4px; }
.login-foot { color: #959a97; text-align: center; font-size: 11px; margin: 25px 0 0; }

.public-body { min-height: 100vh; background: #fbfaf6; }
.public-header { height: 68px; padding: 0 max(4vw, 35px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 55px; background: var(--paper); }
.public-brand { font-size: 23px; font-weight: 700; }
.public-header nav { display: flex; gap: 35px; font: 600 17px/1 "Noto Serif SC", serif; }
.public-header > .secondary-button { margin-left: auto; }
.public-hero { min-height: calc(100vh - 68px); position: relative; overflow: hidden; }
.public-hero > img { position: absolute; inset: 0 0 0 auto; width: 72%; height: 100%; object-fit: cover; }
.public-hero:after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #fbfaf6 0 32%, rgba(251,250,246,.91) 45%, rgba(251,250,246,0) 74%); }
.public-hero > div { position: relative; z-index: 1; padding: 11vh max(5vw, 50px); max-width: 760px; }
.public-hero > div > p { color: #6f7b74; font-size: 13px; }
.public-hero h1 { font-size: clamp(42px, 4.4vw, 66px); line-height: 1.2; margin: 16px 0; }
.public-hero > div > span { color: #647069; display: block; margin-bottom: 27px; }

@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 184px minmax(0, 1fr); }
  .admin-side { width: 184px; }
  .search-stub { display: none; }
  .admin-main { padding: 28px 25px 45px; }
  .dashboard-grid, .settings-layout { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr 430px; }
  .login-visual-copy { left: 35px; }
}

@media (max-width: 680px) {
  .admin-shell { display: block; }
  .admin-side { position: static; width: 100%; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; display: flex; align-items: center; gap: 8px; }
  .admin-brand { padding: 7px 10px; min-width: max-content; }
  .admin-side nav { flex-direction: row; min-width: max-content; }
  .nav-divider, .nav-link.is-disabled { display: none; }
  .nav-link { min-height: 38px; padding: 0 10px; font-size: 12px; }
  .admin-content { grid-column: auto; }
  .admin-topbar { height: 58px; padding: 0 16px; }
  .content-tabs { gap: 20px; font-size: 15px; }
  .top-actions .icon-button { display: none; }
  .admin-main { padding: 20px 16px 38px; }
  .dashboard-hero { height: 360px; }
  .dashboard-hero > img { opacity: .72; }
  .hero-wash { background: rgba(250,249,244,.76); }
  .dashboard-hero-copy { padding: 29px 23px; }
  .dashboard-hero-copy h1 { font-size: 34px; }
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .metric-row div:nth-child(2) { border-right: 0; }
  .metric-row div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .page-heading { align-items: flex-start; }
  .settings-layout { padding-top: 19px; }
  .form-actions { align-items: flex-start; flex-direction: column; }
  .form-actions .primary-button { width: 100%; }
  .login-shell { display: block; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; padding: 28px 24px; }
  .login-form-wrap { margin: auto; }
  .public-header { padding: 0 18px; gap: 20px; }
  .public-header nav { display: none; }
  .public-header .secondary-button { padding: 0 11px; }
  .public-hero > img { width: 100%; opacity: .62; }
  .public-hero:after { background: rgba(251,250,246,.68); }
  .public-hero > div { padding: 70px 24px; }
  .public-hero h1 { font-size: 40px; }
}

/* Phase two: content and assets */
.content-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.content-heading h1 { margin: 5px 0 6px; font-size: 34px; }
.content-heading p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.list-toolbar { min-height: 66px; padding: 12px 14px; border: 1px solid var(--line); background: var(--paper); display: flex; align-items: end; gap: 12px; }
.list-toolbar label { color: #68746e; font-size: 11px; }
.list-toolbar select { min-width: 145px; }
.filter-search { min-width: 250px; flex: 1; height: 42px; border: 1px solid #dcd7ce; background: #fff; display: flex; align-items: center; gap: 9px; padding: 0 12px; border-radius: 5px; }
.filter-search input { width: 100%; border: 0; outline: 0; background: transparent; }
.content-list-panel { border: 1px solid var(--line); border-top: 0; background: var(--paper); }
.list-summary { min-height: 43px; padding: 0 17px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.content-row { min-height: 112px; padding: 15px 17px; border-bottom: 1px solid #ece8e0; display: grid; grid-template-columns: 118px minmax(220px, 1fr) minmax(150px, .45fr) 34px; align-items: center; gap: 18px; }
.content-row > img, .content-cover-placeholder { width: 118px; height: 80px; object-fit: cover; background: #e8eee8; border-radius: 4px; }
.content-cover-placeholder { display: grid; place-items: center; color: #668275; font-size: 25px; }
.content-row h2 { margin: 5px 0; font-size: 18px; line-height: 1.3; }
.content-row-main > p { margin: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 550px; }
.content-row-meta { display: flex; align-items: center; gap: 9px; color: #89918c; font-size: 10px; }
.content-status { display: inline-flex; padding: 3px 7px; border-radius: 11px; font-weight: 600; }
.content-status.published { color: #326148; background: #e2eee5; }
.content-status.draft { color: #765f2d; background: #f1ead8; }
.content-status.changed { color: #874a32; background: #f4e4dd; }
.content-status.trashed { color: #787878; background: #e9e9e7; }
.content-row-path { display: grid; justify-items: start; gap: 9px; min-width: 0; }
.content-row-path code { max-width: 100%; color: #6e7772; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-row-path a { color: #a54b35; font-size: 11px; }
.content-row-actions a, .content-row-actions button { width: 32px; height: 32px; border: 0; background: transparent; display: grid; place-items: center; color: #53675e; font-size: 18px; }
.tag-line { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag-line span, .tag-line em, .article-heading a { padding: 3px 7px; background: #f0ede5; color: #627067; border-radius: 3px; font-size: 10px; font-style: normal; }
.empty-state { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-state > i { font-size: 38px; color: #6e867a; }
.empty-state h2 { margin: 12px 0 5px; color: var(--ink); }
.empty-state .primary-button { margin-top: 10px; }
.pagination { padding: 15px 17px; display: flex; justify-content: center; align-items: center; gap: 22px; color: var(--muted); font-size: 12px; }
.pagination a { color: #a54b35; }

.editor-status-line { min-height: 38px; margin: -12px 0 9px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.editor-status-line a { margin-left: auto; color: #a54b35; }
.document-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.editor-main, .editor-panel { border: 1px solid var(--line); background: var(--paper); padding: 20px; }
.editor-main { display: grid; gap: 17px; min-width: 0; }
.editor-main > label, .editor-main > label > * { min-width: 0; max-width: 100%; }
.document-editor label { display: grid; gap: 7px; color: #65716b; font-size: 11px; font-weight: 600; }
.document-editor input, .document-editor textarea, .document-editor select, .list-toolbar select { width: 100%; border: 1px solid #dcd7ce; border-radius: 5px; background: #fff; color: var(--ink); padding: 10px 11px; outline: 0; }
.document-editor input:focus, .document-editor textarea:focus, .document-editor select:focus { border-color: #9b725f; box-shadow: 0 0 0 3px #f4e8e2; }
.title-input input { font: 600 23px/1.35 "Noto Serif SC", serif; }
.editor-sidebar { display: grid; gap: 15px; }
.editor-panel h2 { font-size: 17px; margin: 0 0 15px; }
.editor-panel { display: grid; gap: 14px; }
.text-link { color: #a54b35; font-size: 11px; }
.asset-reference-list { max-height: 300px; overflow: auto; display: grid; gap: 6px; }
.asset-ref { min-height: 49px; padding: 5px; display: grid; grid-template-columns: 52px minmax(0, 1fr) 24px; align-items: center; gap: 8px; border: 1px solid #e3dfd6; background: #fff; text-align: left; color: #465b52; }
.asset-ref img { width: 52px; height: 38px; object-fit: cover; }
.asset-ref span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.editor-actions { grid-column: 1 / -1; min-height: 62px; padding: 10px 16px; border: 1px solid var(--line); background: var(--paper); display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.editor-actions > span { margin-right: auto; color: var(--muted); font-size: 11px; }
.publish-actions { margin-top: 15px; display: flex; justify-content: flex-end; align-items: center; gap: 9px; }
.danger-zone { margin-left: auto; }
.danger-zone button { min-height: 42px; padding: 0 13px; border: 1px solid #ebd4cd; background: #fff9f7; color: #a04431; border-radius: 5px; }
.EasyMDEContainer { min-width: 0; max-width: 100%; overflow: hidden; }
.EasyMDEContainer .CodeMirror { width: 100%; min-width: 0; min-height: 470px; border-color: #dcd7ce; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.EasyMDEContainer .CodeMirror-scroll { max-width: 100%; }
.EasyMDEContainer .editor-toolbar { border-color: #dcd7ce; background: #f8f6f1; }

.asset-upload-panel { border: 1px solid var(--line); background: var(--paper); padding: 16px; margin-bottom: 12px; }
.asset-upload-panel form { display: flex; align-items: center; gap: 12px; }
.upload-drop { min-height: 65px; padding: 10px 15px; border: 1px dashed #bfc8c1; background: #f8faf7; display: flex; align-items: center; gap: 13px; flex: 1; cursor: pointer; }
.upload-drop > i { font-size: 25px; color: #527564; }
.upload-drop span { display: grid; gap: 4px; }
.upload-drop small { color: var(--muted); font-size: 10px; }
.upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.asset-toolbar { border-bottom: 0; }
.asset-library { border: 1px solid var(--line); background: var(--paper); }
.asset-grid { padding: 15px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.asset-card { min-width: 0; border: 1px solid #e4dfd6; background: #fff; }
.asset-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #edf0eb; display: block; }
.asset-card > div { padding: 11px; }
.asset-card h2 { margin: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Phase four: publishing operations */
.heading-actions, .row-actions { display: flex; align-items: center; gap: 8px; }
.heading-actions form, .row-actions form { margin: 0; }
.content-panel { margin-top: 22px; border: 1px solid var(--line); background: var(--paper); }
.panel-heading { min-height: 76px; padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.panel-heading h2 { margin: 3px 0 0; font-size: 19px; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table-wrap th, .table-wrap td { padding: 12px 14px; border-bottom: 1px solid #ece8e0; text-align: left; vertical-align: middle; }
.table-wrap th { color: #68746e; background: #faf8f3; font-size: 10px; font-weight: 700; white-space: nowrap; }
.table-wrap td code { display: block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5f6d66; }
.row-actions { min-width: 126px; }
.row-actions .icon-button { flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid #e1ddd4; background: #fff; }
.status-badge.status-failed { color: #963f2b; background: #f7e7e2; }
.status-badge.status-running { color: #765f2d; background: #f1ead8; }

@media (max-width: 680px) {
  .page-heading { flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions form { flex: 1; }
  .heading-actions button { width: 100%; }
  .table-wrap table { min-width: 760px; }
}
.asset-card p { margin: 5px 0 8px; color: var(--muted); font-size: 10px; }
.asset-card code { display: block; padding: 6px; background: #f4f2ec; font-size: 9px; overflow: hidden; text-overflow: ellipsis; }
.asset-card-actions { min-height: 38px; display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.asset-card-actions button { min-height: 31px; border: 0; background: transparent; color: #566c62; display: flex; align-items: center; gap: 5px; font-size: 10px; }
.asset-card-actions button:disabled { opacity: .3; cursor: not-allowed; }
.usage-badge { color: #8a563d; background: #f4e7df; padding: 4px 6px; font-size: 9px; }

.public-footer { min-height: 90px; padding: 0 max(4vw, 35px); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.public-hero.phase-two { min-height: 650px; height: calc(100vh - 68px); }
.public-hero.phase-two > div { display: flex; flex-direction: column; align-items: flex-start; }
.public-latest, .public-list-main { max-width: 1180px; margin: 0 auto; padding: 70px 34px 90px; }
.public-section-heading { margin-bottom: 25px; display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.public-section-heading h2 { margin: 4px 0 0; font-size: 30px; }
.public-section-heading > a { color: #a54b35; font-size: 12px; }
.public-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 21px; }
.public-content-card { min-width: 0; border-bottom: 1px solid #ddd8cf; padding-bottom: 19px; }
.public-content-card img, .public-card-placeholder { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #e9eee8; display: grid; place-items: center; color: #60796c; font-size: 34px; }
.public-content-card p { margin: 14px 0 6px; color: #8b928e; font-size: 10px; }
.public-content-card h2 { margin: 0 0 7px; font-size: 21px; line-height: 1.4; }
.public-content-card span { color: #67736d; font-size: 12px; line-height: 1.7; }
.public-list-heading { max-width: 720px; margin: 10px 0 38px; }
.public-list-heading h1 { margin: 8px 0; font-size: 47px; }
.public-list-heading > p:last-child { color: var(--muted); }
.public-empty { padding: 70px 0; color: var(--muted); text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.public-pagination { margin-top: 40px; display: flex; align-items: center; justify-content: center; gap: 28px; color: var(--muted); font-size: 12px; }
.public-pagination a { color: #a54b35; }
.public-detail { max-width: 830px; margin: 0 auto; padding: 75px 30px 110px; }
.public-detail.wide { max-width: 1120px; }
.public-detail.minimal { max-width: 680px; }
.article-heading { margin-bottom: 34px; }
.article-heading h1 { margin: 10px 0 14px; font-size: 48px; line-height: 1.24; }
.article-heading > p:not(.eyebrow) { color: var(--muted); font-size: 16px; line-height: 1.8; }
.article-heading > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #848c87; font-size: 11px; }
.article-heading time { margin-right: 8px; }
.article-cover { width: 100%; max-height: 610px; object-fit: cover; margin-bottom: 39px; }
.markdown-body { color: #283f37; font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; }
.markdown-body h2 { margin-top: 2.1em; font-size: 28px; }
.markdown-body h3 { margin-top: 1.8em; font-size: 21px; }
.markdown-body img { max-width: 100%; height: auto; }
.markdown-body blockquote { margin: 24px 0; padding: 8px 20px; border-left: 3px solid #b75a40; background: #f6f1eb; color: #56665f; }
.markdown-body pre { overflow: auto; padding: 16px; background: #17372f; color: #f5f3ec; }
.markdown-body table { width: 100%; border-collapse: collapse; }
.markdown-body th, .markdown-body td { border: 1px solid var(--line); padding: 8px 10px; }

@media (max-width: 1020px) {
  .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .document-editor { grid-template-columns: minmax(0, 1fr) 250px; }
  .content-row { grid-template-columns: 96px minmax(190px, 1fr) 120px 30px; }
  .content-row > img, .content-cover-placeholder { width: 96px; height: 68px; }
}

@media (max-width: 760px) {
  .content-heading { align-items: flex-start; flex-direction: column; }
  .list-toolbar { align-items: stretch; flex-direction: column; }
  .filter-search { min-width: 0; flex: none; width: 100%; }
  .content-row { grid-template-columns: 72px minmax(0, 1fr) 30px; gap: 11px; }
  .content-row > img, .content-cover-placeholder { width: 72px; height: 58px; }
  .content-row-path { grid-column: 2; }
  .content-row-actions { grid-column: 3; grid-row: 1 / 3; }
  .document-editor { display: flex; flex-direction: column; }
  .editor-main, .editor-sidebar, .editor-actions { width: 100%; }
  .asset-upload-panel form { align-items: stretch; flex-direction: column; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-hero.phase-two { min-height: 560px; height: auto; }
  .public-card-grid { grid-template-columns: 1fr; }
  .public-latest, .public-list-main { padding: 48px 20px 65px; }
  .article-heading h1 { font-size: 36px; }
  .public-detail { padding: 48px 20px 75px; }
}

/* Phase 3: Slide studio, homepage composition, and public presentation. */
.deck-admin-list, .homepage-template-panel, .placement-panel, .menu-editor { border: 1px solid var(--line); background: var(--paper); }
.deck-admin-grid { padding: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.deck-admin-card { min-width: 0; border: 1px solid #dedbd2; background: #fff; position: relative; }
.deck-admin-card > form { position: absolute; right: 8px; bottom: 8px; }
.deck-admin-card > form button { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; }
.deck-admin-copy { padding: 14px; }
.deck-admin-copy > div { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.deck-admin-copy h2 { margin: 9px 0 5px; font-size: 17px; }
.deck-admin-copy p { min-height: 36px; margin: 0 0 8px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.deck-admin-copy code { display: block; overflow: hidden; color: #6c756f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.content-status.changed { background: #f1e7d2; color: #82652d; }
.slide-thumb-frame { container-type: inline-size; width: 100%; aspect-ratio: 16 / 9; display: block; position: relative; overflow: hidden; background: #e8ece8; isolation: isolate; }
.slide-thumb-scale { width: 1280px; height: 720px; position: absolute; inset: 0 auto auto 0; transform: scale(calc(100cqw / 1280)); transform-origin: 0 0; contain: layout paint style; pointer-events: none; }
.slide-thumb-lazy { background: #e6ebe7; }
.deck-cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: #5e756b; font-size: 40px; }

.deck-editor-form { display: grid; gap: 14px; }
.deck-meta-panel { padding: 17px; border: 1px solid var(--line); background: var(--paper); display: grid; gap: 13px; }
.deck-meta-panel label, .slide-source label { min-width: 0; display: grid; gap: 6px; color: #65716b; font-size: 10px; font-weight: 600; }
.deck-meta-panel input, .deck-meta-panel textarea, .deck-meta-panel select, .slide-source textarea, .slide-source select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #dcd7ce; border-radius: 4px; background: #fff; }
.deck-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.slide-workbench { min-width: 0; min-height: 610px; display: grid; grid-template-columns: 170px minmax(330px, 1fr) minmax(300px, .85fr); border: 1px solid #d7d4cc; background: #fff; }
.slide-pages { min-width: 0; border-right: 1px solid #d7d4cc; background: #f4f3ef; }
.slide-pages-head, .slide-source-toolbar, .slide-preview-head { height: 43px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ddd9d1; font-size: 11px; }
.slide-pages button, .slide-source-toolbar button, .placement-actions button { width: 29px; height: 29px; border: 0; background: transparent; color: #51665d; }
#slide-tabs { padding: 8px; display: grid; gap: 7px; }
#slide-tabs button { width: 100%; min-height: 58px; padding: 8px; border: 1px solid transparent; background: #fff; display: grid; grid-template-columns: 23px minmax(0, 1fr); align-items: start; gap: 5px; color: #53635c; text-align: left; }
#slide-tabs button.active { border-color: #9b725f; box-shadow: inset 3px 0 #a54b35; }
#slide-tabs button span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-source { min-width: 0; border-right: 1px solid #d7d4cc; display: grid; grid-template-rows: 43px 470px auto auto; }
.slide-source-toolbar > div { display: flex; gap: 2px; }
#monaco-editor { min-width: 0; width: 100%; height: 470px; }
.slide-source > label { padding: 9px 12px 0; }
.slide-source > label:last-child { padding-bottom: 11px; }
.slide-live-preview { min-width: 0; background: #edece8; }
#slide-diagnostics { color: #5d786c; font-size: 9px; }
#slide-preview-canvas { container-type: inline-size; width: calc(100% - 24px); aspect-ratio: 16 / 9; margin: 22px 12px; position: relative; overflow: hidden; background: #fff; box-shadow: 0 8px 24px #2f44352b; }
#slide-preview-canvas > .slide-canvas { position: absolute; inset: 0 auto auto 0; transform: scale(calc((100cqw - 24px) / 1280)); transform-origin: 0 0; pointer-events: none; }

.slide-canvas { box-sizing: border-box; width: 1280px; height: 720px; overflow: hidden; position: relative; background: #fbfaf6; color: #17382f; font-family: "Noto Sans SC", sans-serif; isolation: isolate; }
.slide-canvas *, .slide-canvas *::before, .slide-canvas *::after { box-sizing: border-box; }
.slide-inner { width: 100%; height: 100%; padding: 84px 96px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.slide-canvas h1 { margin: 0 0 30px; max-width: 1050px; font: 700 68px/1.15 "Noto Serif SC", serif; }
.slide-canvas h2 { margin: 0 0 25px; font: 700 52px/1.2 "Noto Serif SC", serif; }
.slide-canvas h3 { margin: 0 0 17px; font-size: 33px; }
.slide-canvas p, .slide-canvas li { font-size: 29px; line-height: 1.6; }
.slide-canvas p { margin: 0 0 18px; }
.slide-canvas ul, .slide-canvas ol { margin: 0; padding-left: 44px; }
.slide-canvas pre { max-height: 400px; margin: 15px 0; padding: 25px; overflow: hidden; background: #132b25; color: #f7f5ec; font-size: 23px; line-height: 1.55; }
.slide-canvas img { max-width: 100%; max-height: 440px; object-fit: contain; }
.slide-canvas blockquote { margin: 0; padding-left: 38px; border-left: 8px solid #b9583d; font: 500 42px/1.5 "Noto Serif SC", serif; }
.slide-theme-forest { background: #163b31; color: #f6f1e6; }
.slide-theme-forest a { color: #d7b65c; }
.slide-theme-sunrise { background: #f4e7db; color: #672e25; }
.slide-theme-sunrise .slide-inner { border-top: 18px solid #c25037; }
.slide-layout-title .slide-inner, .slide-layout-center .slide-inner { align-items: center; text-align: center; }
.slide-layout-title h1 { font-size: 80px; }
.slide-layout-columns .slide-inner { display: block; column-count: 2; column-gap: 70px; padding-top: 95px; }
.slide-layout-columns h1, .slide-layout-columns h2 { column-span: all; }
.slide-layout-image .slide-inner { padding: 45px; align-items: center; text-align: center; }
.slide-layout-quote .slide-inner { padding-left: 160px; padding-right: 160px; }
.slide-video-placeholder, .slide-video-loader, .slide-canvas iframe { width: min(880px, 100%); aspect-ratio: 16 / 9; margin: 10px auto; border: 0; background: #132b25; color: #fff; display: grid; place-items: center; align-content: center; gap: 12px; }
.slide-video-placeholder span, .slide-video-loader span { color: #dcb861; font-size: 20px; text-transform: uppercase; }
.slide-video-placeholder strong, .slide-video-loader strong { font-size: 29px; }
.slide-notes { display: none; }

.homepage-admin { display: grid; grid-template-columns: minmax(300px, .7fr) minmax(450px, 1.3fr); gap: 17px; align-items: start; }
.homepage-template-panel, .placement-panel, .menu-editor { padding: 18px; }
.template-choice-grid { display: grid; gap: 9px; }
.template-choice { cursor: pointer; }
.template-choice input { position: absolute; opacity: 0; }
.template-choice > span { min-height: 74px; padding: 12px; border: 1px solid #ddd9d0; display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 3px 10px; align-items: center; }
.template-choice i { grid-row: 1 / 3; font-size: 25px; color: #688276; }
.template-choice small { color: var(--muted); }
.template-choice.active > span { border-color: #9b725f; background: #faf2ed; }
.placement-list { display: grid; gap: 8px; }
.placement-row { min-height: 65px; padding: 8px 9px; border: 1px solid #dedad1; display: grid; grid-template-columns: 24px minmax(0, 1fr) 60px auto; gap: 9px; align-items: center; }
.placement-row.is-hidden { opacity: .48; }
.placement-row small { display: block; margin-top: 3px; color: var(--muted); }
.placement-row code { color: #79837e; font-size: 9px; }
.placement-actions { display: flex; }
.navigation-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; align-items: start; }
.menu-item-list { display: grid; gap: 8px; }
.menu-item-row { display: grid; grid-template-columns: 27px minmax(90px, .65fr) minmax(140px, 1.35fr) 58px; gap: 8px; align-items: end; }
.menu-item-row > span { padding-bottom: 11px; color: #9a9e9b; font: 10px monospace; }
.menu-item-row label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; }
.menu-item-row input { width: 100%; min-width: 0; padding: 9px; border: 1px solid #ddd9d0; }
.menu-item-row.optional { opacity: .72; }
.menu-item-row .visibility-check { padding-bottom: 9px; display: flex; align-items: center; gap: 4px; }
.menu-item-row .visibility-check input { width: auto; }
.menu-editor footer { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; }

.public-hero.phase-three { min-height: 610px; height: calc(100vh - 68px); max-height: 760px; position: relative; overflow: hidden; color: #fff; }
.public-hero.phase-three::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #112d27d9 0%, #17392d94 49%, #17392d22 78%); }
.public-hero.phase-three > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.public-hero.phase-three > div { max-width: 720px; position: absolute; z-index: 1; left: max(6vw, 55px); top: 50%; transform: translateY(-50%); }
.public-hero.phase-three h1 { margin: 14px 0 20px; font-size: 54px; line-height: 1.3; }
.public-hero.phase-three p { letter-spacing: 0; font-size: 11px; }
.public-hero.phase-three span { font-size: 14px; }
.hero-actions { margin-top: 27px; display: flex; gap: 9px; }
.public-hero.phase-three .secondary-button { border-color: #ffffff8a; color: #fff; background: #17372f55; }
.home-decks, .home-note { max-width: 1180px; margin: 0 auto; padding: 15px 34px 85px; }
.home-note { max-width: none; padding: 75px max(7vw, 40px); background: #183b31; color: #f6f2e8; }
.home-note h2 { margin: 7px 0; font-size: 34px; }
.home-note > p:last-child { color: #c5d1c9; }
.public-deck-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 21px; }
.public-deck-card { min-width: 0; border: 1px solid #ddd9d0; background: #fff; }
.public-deck-card > a > div:last-child { padding: 14px; }
.public-deck-card p { margin: 0 0 6px; color: var(--muted); font-size: 10px; }
.public-deck-card h3 { margin: 0 0 7px; font-size: 19px; }
.public-deck-card span { color: #69756f; font-size: 11px; line-height: 1.65; }
.deck-page-count { position: absolute; z-index: 2; right: 7px; bottom: 7px; padding: 4px 7px; background: #17372fe8; color: #fff !important; font-size: 9px !important; }
.slide-list-main { max-width: 1180px; }
.deck-detail { max-width: 1180px; margin: 0 auto; padding: 70px 34px 95px; display: grid; grid-template-columns: minmax(280px, .7fr) minmax(420px, 1.3fr); gap: 55px; }
.deck-detail > header { align-self: center; }
.deck-detail > header h1 { margin: 10px 0; font-size: 46px; line-height: 1.25; }
.deck-detail > header > p:not(.eyebrow) { color: var(--muted); line-height: 1.75; }
.deck-detail > header > div { margin: 20px 0; display: flex; gap: 12px; color: var(--muted); font-size: 11px; }
.deck-detail-preview { align-self: center; box-shadow: 0 16px 45px #273e3526; }
.deck-slide-index { grid-column: 1 / -1; margin-top: 25px; }
.deck-slide-index > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.deck-slide-index > div > a { color: var(--ink); font-size: 10px; }
.deck-slide-index > div > a > span { display: block; margin-bottom: 6px; color: var(--muted); }

.slide-show-body { min-height: 100vh; margin: 0; background: #101613; color: #fff; }
.slide-show-body .caption { display: none; }
.slide-show-body .slide { width: 1280px; height: 720px; margin: 24px auto; position: relative; overflow: hidden; background: #fff; }
.slide-show-body.full { overflow: hidden; }
.slide-show-body.full .slide { display: none; position: absolute; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -50%) scale(var(--shower-scale, 1)); transform-origin: 50% 50%; }
.slide-show-body.full.native-size .slide { left: calc(50% - 640px); top: calc(50% - 360px); transform: none; }
.slide-show-body.full .slide.active { display: block; }
.slide-show-body.full .slide:target { display: block; }
.slide-show-body .progress { position: fixed !important; z-index: 20; left: 0 !important; right: auto !important; top: auto !important; bottom: 0 !important; height: 4px !important; max-height: 4px; transform: none !important; background: #d4ab55; }
.slide-exit { position: fixed; z-index: 30; top: 13px; right: 13px; padding: 7px 10px; background: #0f1d19c7; color: #fff; font-size: 11px; }

@media (max-width: 1120px) {
  .deck-admin-grid, .public-deck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide-workbench { grid-template-columns: 135px minmax(300px, 1fr) minmax(260px, .8fr); }
  .deck-meta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .navigation-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .deck-admin-grid, .public-deck-grid, .deck-slide-index > div { grid-template-columns: 1fr; }
  .deck-meta-grid { grid-template-columns: 1fr 1fr; }
  .slide-workbench { display: flex; flex-direction: column; }
  .slide-pages { border-right: 0; border-bottom: 1px solid #d7d4cc; }
  #slide-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slide-source { border-right: 0; border-bottom: 1px solid #d7d4cc; grid-template-rows: 43px 380px auto auto; }
  #monaco-editor { height: 380px; }
  .homepage-admin { grid-template-columns: 1fr; }
  .menu-item-row { grid-template-columns: 24px minmax(0, 1fr); }
  .menu-item-row label:nth-of-type(2), .menu-item-row .visibility-check { grid-column: 2; }
  .public-hero.phase-three { min-height: 560px; height: 78vh; }
  .public-hero.phase-three > div { left: 20px; right: 20px; }
  .public-hero.phase-three h1 { font-size: 36px; }
  .home-decks { padding: 10px 20px 60px; }
  .deck-detail { padding: 48px 20px 70px; grid-template-columns: 1fr; gap: 30px; }
  .deck-detail > header h1 { font-size: 35px; }
  .deck-slide-index { grid-column: 1; }
}

/* Public homepage templates: each selector maps to a distinct admin-selectable composition. */
.studio-hero,.profile-hero { height:420px; position:relative; overflow:hidden; border-bottom:1px solid #e6e2d9; }
.studio-hero>img,.profile-hero>img { position:absolute;right:0;top:0;width:67%;height:100%;object-fit:cover; }
.studio-hero::after,.profile-hero::after { content:"";position:absolute;inset:0;background:linear-gradient(90deg,#fbfaf6 0 35%,rgba(251,250,246,.92) 48%,rgba(251,250,246,0) 73%); }
.studio-hero>div,.profile-hero>div { position:relative;z-index:1;max-width:700px;padding:42px 0 0 max(5vw,48px); }
.studio-hero h1,.profile-hero h1,.journal-hero h1 { font-family:Georgia,"Noto Serif SC",serif;font-size:clamp(39px,4.3vw,63px);line-height:1.18;letter-spacing:-.06em;margin:13px 0;color:#113830; }
.studio-hero p:not(.date),.profile-hero p:not(.date),.journal-hero p:not(.date) {font-size:15px;line-height:1.75;color:#647069;margin-bottom:21px;}
.public-primary {display:inline-flex;align-items:center;gap:12px;background:#c45c3e;color:#fffaf4;border-radius:26px;padding:14px 24px;font-weight:600;}
.public-grid,.journal-layout,.profile-layout {max-width:1260px;margin:0 auto;padding:36px 42px 55px;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(330px,.9fr);gap:48px;}
.public-title {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:17px;}.public-title h2,.public-quote h2,.profile-card h2{font-family:Georgia,"Noto Serif SC",serif;font-size:29px;margin:0;}.public-title a{font-size:13px;color:#65716b;}
.article-row{border-top:1px solid #e9e5db;padding:14px 0;}.article-row:first-of-type{border-top:0}.article-row>a{display:grid;grid-template-columns:204px minmax(0,1fr);gap:19px;color:inherit;}.article-row img,.article-row .public-card-placeholder{width:204px;height:119px;object-fit:cover;border-radius:3px;background:#edf0eb;display:grid;place-items:center}.article-row h3{font-family:Georgia,"Noto Serif SC",serif;font-size:19px;margin:4px 0;color:#1b3f35}.article-meta,.article-copy{font-size:13px;color:#747d76;line-height:1.6;margin:0 0 5px}.slides-panel,.journal-deck,.profile-card{border-left:1px solid #e5e1d7;padding-left:34px}.deck-feature,.journal-deck-feature{position:relative;min-height:300px;overflow:hidden;border-radius:4px;color:#fff;background:#17372f}.deck-feature img,.journal-deck-feature img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.deck-feature::after,.journal-deck-feature::after{content:"";position:absolute;inset:0;background:rgba(11,37,31,.4)}.deck-feature div,.journal-deck-feature div{position:absolute;z-index:1;left:24px;right:24px;bottom:21px}.deck-feature h3,.journal-deck-feature h3{font-family:Georgia,"Noto Serif SC",serif;font-size:38px;margin:0 0 7px}.deck-feature span,.journal-deck-feature span{display:block;margin-top:18px}.public-quote{max-width:1260px;margin:0 auto;padding:31px 42px 42px;border-top:1px solid #e5e1d7}.public-quote p{max-width:660px;color:#65716b;line-height:1.75}
.journal-hero{min-height:430px;display:grid;grid-template-columns:47% 53%;border-bottom:1px solid #e7e2d8;background:linear-gradient(90deg,#fbfaf6 47%,transparent 47%),url('/static/assets/hero-studio.png') right/53% 100% no-repeat}.journal-hero>img{display:none}.journal-hero>div{padding:55px 9%}.journal-layout{grid-template-columns:minmax(0,1.25fr) minmax(310px,.75fr)}.journal-deck-feature{min-height:230px}.landscape-footer{height:240px;position:relative;overflow:hidden;color:#fff}.landscape-footer img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.landscape-footer::after{content:"";position:absolute;inset:0;background:rgba(14,48,40,.32)}.landscape-footer div{position:relative;z-index:1;padding:57px max(7vw,70px)}.landscape-footer h2{font-family:Georgia,"Noto Serif SC",serif;font-size:32px;margin:0 0 10px}.landscape-footer p{margin:0}
.profile-hero{height:455px}.profile-layout{grid-template-columns:minmax(0,1.15fr) 330px}.profile-card>img{width:178px;height:178px;object-fit:cover;border-radius:50%;display:block;margin:18px auto}.profile-card h3{font-family:Georgia,"Noto Serif SC",serif;font-size:22px;margin:14px 0 8px}.profile-card>p{line-height:1.75;font-size:14px;color:#67726c}.profile-facts{margin:18px 0 28px;padding:17px 0;border-top:1px solid #e7e2d8;border-bottom:1px solid #e7e2d8;color:#627069;font-size:13px}.tags{display:flex;flex-wrap:wrap;gap:7px}.tags a{border-radius:15px;padding:6px 10px;background:#f0eee7;color:#657068;font-size:12px}
@media(max-width:920px){.public-grid,.journal-layout,.profile-layout{padding:28px 22px;grid-template-columns:1fr;gap:30px}.slides-panel,.journal-deck,.profile-card{border-left:0;border-top:1px solid #e5e1d7;padding:25px 0 0}.studio-hero>img,.profile-hero>img{width:100%;opacity:.5}.studio-hero::after,.profile-hero::after{background:rgba(251,250,246,.78)}.journal-hero{grid-template-columns:1fr;background:#fbfaf6}.journal-hero>div{padding:48px 34px}.journal-hero>img{display:none}}
@media(max-width:620px){.studio-hero,.profile-hero{height:410px}.studio-hero>div,.profile-hero>div{padding:33px 24px}.article-row>a{grid-template-columns:105px minmax(0,1fr);gap:12px}.article-row img,.article-row .public-card-placeholder{width:105px;height:94px}.article-row h3{font-size:16px}.article-copy{display:none}.deck-feature{min-height:240px}}
/* Persisted homepage placement order: public components follow the exact backend order. */
.home-composed { display: grid; }
.home-component { max-width: 1260px; width: 100%; margin: 0 auto; padding: 36px 42px; }
.home-component.home-articles { max-width: 900px; }.home-component.home-deck-component { max-width: 620px; }.home-component .deck-feature { min-height: 300px; }
.home-composed .profile-card { max-width: 420px; border-left: 0; text-align: center; }.home-composed .profile-card > p { text-align: left; }
@media(max-width:620px){.home-component{padding:28px 22px}.home-component.home-articles,.home-component.home-deck-component{max-width:none}}
.asset-picker-dialog { border: 0; padding: 0; width: min(1100px, 94vw); height: min(780px, 90vh); box-shadow: 0 24px 80px rgba(15,45,45,.3); }
.asset-picker-dialog::backdrop { background: rgba(10,30,30,.45); }
.asset-picker-dialog > header { display:flex; justify-content:space-between; align-items:center; padding:14px 20px; border-bottom:1px solid var(--line,#ddd); }
.asset-picker-dialog > header button { border:0; background:transparent; font-size:26px; cursor:pointer; }
.asset-picker-dialog iframe { display:block; border:0; width:100%; height:calc(100% - 58px); }
.asset-picker-button { display:flex; align-items:center; gap:8px; min-height:42px; }
.asset-picker-button img { width:42px; height:32px; object-fit:cover; border-radius:4px; }
.asset-picker-body { background:#fbfaf5; padding:20px; }
.asset-picker-body > main { max-width:1200px; margin:auto; }
.homepage-admin { grid-template-columns: 1fr; }
.homepage-template-panel, .homepage-copy-form { width: 100%; }
.template-choice-form { display:flex; align-items:end; gap:12px; }
.template-choice-form label { flex:1; }
.asset-reference-list { min-height:120px; align-content:center; }
.asset-body-picker { width:100%; min-height:54px; justify-content:center; }
.asset-picker-content { height:calc(100% - 58px); overflow:auto; padding:20px; background:#fbfaf5; }

/* Homepage admin uses a deliberate vertical editing flow. */
.homepage-admin { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-auto-flow: row; gap: 18px; align-items: stretch; }
.homepage-admin > .homepage-template-panel, .homepage-admin > .homepage-copy-form { grid-column: 1 / -1; width: 100%; box-sizing: border-box; }
.homepage-copy-form { display: block; padding: 20px; border: 1px solid var(--line); background: var(--paper); }
.homepage-copy-form > label { display: block; margin-top: 14px; }
.homepage-copy-form > label > input, .homepage-copy-form > label > textarea, .homepage-copy-form > label > select { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; }
.homepage-copy-form .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.homepage-copy-form .form-grid label { display:block; }
.homepage-copy-form .form-grid input { width:100%; box-sizing:border-box; margin-top:6px; }

.home-article-tags { margin-top: 9px; }
.home-article-tags span { font-size: 11px; padding: 4px 9px; border-radius: 12px; background: #eef0e9; color: #5c6d64; }

.public-tag-filter { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 22px; }
.public-tag-filter a { padding:6px 11px; border:1px solid #d9d5ca; border-radius:16px; color:#63716a; font-size:12px; }
.public-tag-filter a.active { background:#17372f; color:#fff; border-color:#17372f; }
.public-pagination { min-height:36px; }
/* The stored asset select remains for form submission; the picker button is the only visible control. */
select[name="hero_asset_id"], select[name="note_asset_id"], select[name="cover_asset_id"], select[name="avatar_asset_id"] { display: none !important; }