:root {
  --v2-sidebar: #111827;
  --v2-sidebar-soft: #1f2937;
  --v2-sidebar-text: #dbe3ef;
  --v2-accent: #2259a8;
  --v2-accent-soft: #e8f0fc;
  --v2-page: #f6f7f9;
  --v2-line: #e5e7eb;
  --v2-soft: #f9fafb;
  --v2-ink: #121826;
  --v2-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 28px rgba(15, 23, 42, 0.04);
}

/* Shared identity */
.brand { display: inline-flex; align-items: center; gap: 0.65rem; letter-spacing: -0.01em; }
.brand-mark { width: 2rem; height: 2rem; display: inline-grid; place-items: center; border-radius: 0.6rem; color: #fff; background: var(--v2-accent); font-weight: 800; font-size: 0.92rem; }
.section-kicker { margin: 0 0 0.25rem; color: var(--color-subtle); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.card-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.65rem; }

/* Owner application shell */
.owner-shell { background: var(--v2-page); }
.owner-app { min-height: 100vh; display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); }
.owner-sidebar { position: sticky; top: 0; height: 100vh; min-width: 0; display: flex; flex-direction: column; color: var(--v2-sidebar-text); background: var(--v2-sidebar); border-right: 1px solid rgba(255,255,255,0.06); }
.owner-sidebar .site-header { min-height: 4.7rem; padding: 1.1rem 1rem; justify-content: flex-start; gap: 0.65rem; background: transparent; border: 0; }
.owner-sidebar .brand { color: #fff; font-size: 1.02rem; }
.owner-sidebar .brand-mark { background: #fff; color: var(--v2-sidebar); }
.owner-badge { margin-left: auto; padding: 0.16rem 0.45rem; border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; color: #aebbd0; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.owner-nav { min-width: 0; display: block; padding: 0.45rem 0.75rem 1rem; }
.owner-nav .nav-group { display: block; margin: 0 0 1.35rem; }
.owner-nav .nav-group-label { display: block; margin: 0 0 0.45rem; padding: 0 0.55rem; color: #8190a6; font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; }
.owner-nav .nav-group-links { display: grid; gap: 0.2rem; }
.owner-nav a, .owner-nav .secondary-link { min-height: 2.55rem; width: 100%; display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.65rem; border-radius: 0.55rem; color: #b9c4d4; font-size: 0.93rem; text-decoration: none; }
.owner-nav a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.owner-nav a.active, .owner-nav a[aria-current="page"], .owner-nav .secondary-link.active { color: #fff; background: var(--v2-sidebar-soft); font-weight: 700; }
.nav-icon { width: 1.25rem; display: inline-flex; justify-content: center; color: #8fa0b8; font-size: 1rem; }
.owner-nav a.active .nav-icon { color: #b9d1ff; }
.owner-sidebar-footer { margin-top: auto; padding: 0.9rem 0.85rem 1rem; display: grid; gap: 0.65rem; border-top: 1px solid rgba(255,255,255,0.07); }
.sidebar-public-link { min-height: 2.5rem; display: flex; align-items: center; justify-content: space-between; padding: 0.4rem 0.55rem; color: #aebbd0; text-decoration: none; font-size: 0.86rem; }
.owner-sidebar .logout-form { margin: 0; }
.owner-sidebar .logout-form button.secondary { width: 100%; justify-content: center; color: #d8e0eb; background: rgba(255,255,255,0.08); }
.owner-workspace { min-width: 0; }
.owner-topbar { position: sticky; z-index: 4; top: 0; min-height: 4.2rem; padding: 0.7rem clamp(1rem, 3vw, 2rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: rgba(255,255,255,0.94); border-bottom: 1px solid var(--v2-line); backdrop-filter: blur(10px); }
.owner-search-link { width: min(28rem, 60%); min-height: 2.55rem; display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.8rem; border: 1px solid #d8dde5; border-radius: 0.65rem; color: #647084; background: #fff; text-decoration: none; font-size: 0.9rem; }
.owner-search-link:hover { border-color: #b8c2d1; color: var(--v2-accent); }
.topbar-public-link { color: #52606d; font-size: 0.88rem; text-decoration: none; }
.owner-page { width: min(80rem, calc(100% - clamp(2rem, 5vw, 4rem))); margin: clamp(1.5rem, 4vw, 2.8rem) auto 4rem; gap: 1.35rem; }
.owner-footer { display: none; }
.owner-shell .panel { border-color: var(--v2-line); border-radius: 0.95rem; box-shadow: var(--v2-shadow); }
.owner-shell .page-heading { align-items: center; }
.owner-shell .page-heading h1 { font-size: clamp(1.75rem, 4vw, 2.45rem); letter-spacing: -0.035em; }
.owner-shell .button-link, .owner-shell button { border-radius: 0.55rem; }
.owner-shell .filter-bar { padding: 0.2rem; width: fit-content; background: #eef1f5; border-radius: 0.65rem; }
.owner-shell .filter-bar a { min-height: 2.35rem; padding: 0.35rem 0.75rem; }
.owner-shell .filter-bar a.selected, .owner-shell .filter-bar a[aria-current="page"] { background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,0.08); }
.owner-shell .content-card { transition: background 120ms ease, border-color 120ms ease; }
.owner-shell .content-card:hover { background: #fbfcfe; }

/* Owner article management */
.article-page-heading { align-items: flex-start !important; }
.article-heading-copy { min-width: 0; flex: 1 1 34rem; }
.article-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.article-title-row h1 { margin: 0.18rem 0; }
.article-state-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.publication-status.private { color: #4b5563; background: #eef0f2; }
.publication-status.published { color: #166534; background: #e8f6ec; }
.publication-status.changed { color: #9a4d00; background: #fff1df; }
.publication-status.withdrawn { color: #8a3a3a; background: #f7e9e9; }
.article-primary-actions { justify-content: flex-end; }
.quick-publication-form { display: inline-flex; margin: 0; }
.quick-publication-form input[type="hidden"] { display: none; }
.publication-overview { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(14rem, 0.8fr); gap: 1.25rem; padding: 1rem 1.15rem; border: 1px solid var(--v2-line); border-left-width: 4px; border-radius: 0.8rem; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,0.03); }
.publication-overview.private { border-left-color: #9ca3af; }
.publication-overview.published { border-left-color: #4f9d69; }
.publication-overview.changed { border-left-color: #c97822; }
.publication-overview.withdrawn { border-left-color: #a85d5d; }
.publication-overview-label { margin: 0 0 0.2rem; color: var(--color-subtle); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.publication-overview strong { display: block; color: var(--v2-ink); font-size: 1rem; }
.publication-overview p:not(.publication-overview-label) { margin: 0.3rem 0 0; color: #55606f; font-size: 0.9rem; }
.publication-overview-url { min-width: 0; align-self: center; display: grid; gap: 0.25rem; }
.publication-overview-url span { color: var(--color-subtle); font-size: 0.78rem; }
.publication-overview-url a { font-size: 0.88rem; }
.article-more-actions { padding: 0.2rem 0; }
.article-more-actions summary { width: fit-content; min-height: 2.5rem; display: inline-flex; align-items: center; color: var(--color-subtle); cursor: pointer; font-size: 0.9rem; font-weight: 650; }
.article-more-actions[open] summary { margin-bottom: 0.55rem; }
.article-list-heading { align-items: flex-end !important; }
.article-library { padding-top: 0.65rem !important; padding-bottom: 0.65rem !important; }
.article-card-list { gap: 0; }
.article-list-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1.05rem 0.2rem; }
.article-list-card-main { min-width: 0; }
.article-list-card .card-title { margin: 0.28rem 0; font-size: 1.08rem; }
.article-list-summary { max-width: 54rem; margin: 0.3rem 0 0.5rem; color: #394556; font-size: 0.92rem; }
.article-list-source { margin: 0.45rem 0 0; font-size: 0.82rem; }
.article-list-card-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 0.65rem; }
.article-list-card-actions .button-link { min-height: 2.35rem; padding: 0.4rem 0.7rem; font-size: 0.84rem; }
.article-list-card-actions > a:not(.button-link) { font-size: 0.86rem; }

/* Owner dashboard */
.dashboard-heading { padding-bottom: 0.25rem; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; }
.metric-card { min-width: 0; min-height: 7.5rem; padding: 1.1rem 1.2rem; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.8rem; align-items: center; border: 1px solid var(--v2-line); border-radius: 0.9rem; color: var(--v2-ink); background: #fff; box-shadow: var(--v2-shadow); text-decoration: none; }
.metric-card:hover { border-color: #c8d2e0; transform: translateY(-1px); }
.metric-card strong { grid-row: 1 / 3; min-width: 3rem; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1; letter-spacing: -0.05em; }
.metric-card span { align-self: end; font-weight: 750; }
.metric-card small { align-self: start; color: var(--color-subtle); font-size: 0.78rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(17rem, 0.7fr); gap: 1.1rem; align-items: start; }
.dashboard-main, .dashboard-aside { min-width: 0; display: grid; gap: 1.1rem; }
.dashboard-section { padding: clamp(1.1rem, 3vw, 1.55rem); }
.dashboard-section .section-heading { align-items: center; padding-bottom: 0.8rem; border-bottom: 1px solid #edf0f3; }
.dashboard-section .section-heading h2, .quick-panel h2 { font-size: 1.12rem; }
.dashboard-section .section-heading > a { font-size: 0.84rem; text-decoration: none; }
.dense-list { gap: 0; }
.dense-card { padding: 1rem 0.1rem; }
.dense-card .card-title { margin: 0.3rem 0; font-size: 1.05rem; }
.dense-card > p { margin: 0.35rem 0 0.65rem; color: #364152; }
.empty-state-card { min-height: 7rem; display: flex; flex-direction: column; justify-content: center; gap: 0.25rem; }
.empty-state-card strong { color: var(--v2-ink); }
.dashboard-timeline { position: relative; gap: 0; }
.dashboard-timeline::before { content: ""; position: absolute; left: 0.34rem; top: 1.25rem; bottom: 1.4rem; width: 1px; background: #dfe5ec; }
.dashboard-timeline .timeline-item { position: relative; display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: 0.75rem; padding: 1rem 0; }
.timeline-marker { z-index: 1; width: 0.72rem; height: 0.72rem; margin-top: 0.38rem; border: 2px solid #fff; border-radius: 999px; background: var(--v2-accent); box-shadow: 0 0 0 1px #b8c7db; }
.timeline-content h3 { margin: 0.25rem 0 0.35rem; font-size: 1.02rem; }
.timeline-content p { margin: 0.3rem 0; }
.topic-current { font-size: 0.88rem; }
.quick-panel { padding: 1.3rem; }
.quick-links { display: grid; gap: 0.35rem; margin-top: 0.75rem; }
.quick-links > a { min-height: 4rem; display: grid; grid-template-columns: 2rem minmax(0,1fr); gap: 0.75rem; align-items: center; padding: 0.65rem; border-radius: 0.65rem; color: var(--v2-ink); text-decoration: none; }
.quick-links > a:hover { background: var(--v2-soft); }
.quick-links > a > span:first-child { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 0.55rem; color: var(--v2-accent); background: var(--v2-accent-soft); font-weight: 800; }
.quick-links strong, .quick-links small { display: block; }
.quick-links strong { font-size: 0.9rem; }
.quick-links small { margin-top: 0.1rem; color: var(--color-subtle); font-size: 0.75rem; font-weight: 400; }
.mini-article-list article { padding: 0.85rem 0; border-bottom: 1px solid #edf0f3; }
.mini-article-list article:last-child { border-bottom: 0; }
.mini-article-list h3 { margin: 0 0 0.3rem; font-size: 0.96rem; }
.mini-article-list p { margin: 0; color: #52606d; font-size: 0.86rem; }

/* Public editorial shell */
.public-shell { background: #fbfaf8; }
.public-shell .site-header { width: min(76rem, calc(100% - 2rem)); margin-inline: auto; padding-inline: 0; background: transparent; border-bottom-color: #e8e3da; }
.public-shell .main-nav a { color: #59616d; font-size: 0.92rem; }
.public-shell .main-nav a.active { color: var(--v2-ink); }
.public-page { width: min(72rem, calc(100% - 2rem)); margin-top: clamp(1.8rem, 4vw, 3rem); gap: clamp(2rem, 4vw, 3.2rem); }
.public-hero { display: block; padding: clamp(1.2rem, 3vw, 2rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid #ddd8cf; }
.public-hero-copy { max-width: 48rem; }
.public-hero h1 { max-width: 46rem; margin: 0.45rem 0 0.8rem; font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif; font-size: clamp(2.05rem, 5vw, 3.4rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.035em; }
.public-lead { max-width: 43rem; margin: 0 0 0.55rem; color: #303946; font-size: clamp(1.02rem, 2vw, 1.2rem); line-height: 1.65; }
.public-intro-note { max-width: 40rem; margin: 0; color: #7a746c; font-size: 0.88rem; }
.hero-actions { margin-top: 1rem; }
.quiet-link { display: inline-flex; align-items: center; gap: 0.4rem; color: #394f72; font-size: 0.92rem; font-weight: 700; text-decoration: none; }
.quiet-link:hover { text-decoration: underline; }
.editorial-heading { align-items: end; margin-bottom: 0.85rem; }
.editorial-heading h2 { font-family: ui-serif, Georgia, Cambria, serif; font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 600; }
.editorial-heading > a { color: #59616d; font-size: 0.86rem; text-decoration: none; }
.featured-reading, .recent-reading { min-width: 0; }
.featured-card { position: relative; max-width: 58rem; padding: clamp(1.2rem, 3vw, 1.8rem); border: 1px solid #ddd8cf; border-radius: 0.45rem; background: #fff; box-shadow: 0 8px 28px rgba(62,50,35,0.04); }
.featured-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; color: #7a746c; font-size: 0.78rem; }
.featured-card h3 { max-width: 50rem; margin: 0.6rem 0 0.55rem; font-family: ui-serif, Georgia, Cambria, serif; font-size: clamp(1.45rem, 3.4vw, 2.2rem); font-weight: 600; line-height: 1.16; letter-spacing: -0.025em; }
.featured-card h3 a { color: var(--v2-ink); text-decoration: none; }
.featured-card > p:not(.chips) { max-width: 48rem; margin: 0.35rem 0; color: #434b57; font-size: 0.94rem; }
.read-more { display: inline-flex; gap: 0.5rem; margin-top: 0.6rem; color: var(--v2-ink); font-size: 0.9rem; font-weight: 750; text-decoration: none; }
.editorial-list { border-top: 1px solid #ddd8cf; }
.editorial-row { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1.1rem; padding: 1.15rem 0; border-bottom: 1px solid #e3ded6; }
.editorial-date { color: #827a70; font-size: 0.78rem; }
.editorial-copy h3 { margin: -0.12rem 0 0.35rem; font-family: ui-serif, Georgia, Cambria, serif; font-size: clamp(1.12rem, 2.6vw, 1.45rem); font-weight: 600; }
.editorial-copy h3 a { color: var(--v2-ink); text-decoration: none; }
.editorial-copy > p:not(.chips) { max-width: 48rem; margin: 0.25rem 0; color: #505863; font-size: 0.9rem; }
.public-shell .chip { background: #f0ece5; color: #514b43; font-size: 0.76rem; }
.public-empty { border-color: #ddd8cf; box-shadow: none; }
.public-shell footer { border-top: 1px solid #e8e3da; }

@media (max-width: 60rem) {
  .owner-app { display: block; }
  .owner-sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .owner-sidebar .site-header { min-height: 3.8rem; padding: 0.7rem 1rem; }
  .owner-nav { padding: 0 0.75rem 0.7rem; }
  .owner-nav .nav-group { margin: 0.4rem 0 0.7rem; }
  .owner-nav .nav-group-label { margin-bottom: 0.3rem; }
  .owner-nav .nav-group-links { display: flex; flex-wrap: wrap; gap: 0.25rem; }
  .owner-nav a, .owner-nav .secondary-link { width: auto; min-height: 2.35rem; padding: 0.35rem 0.55rem; }
  .owner-sidebar-footer { margin: 0; padding: 0.55rem 1rem 0.75rem; display: flex; align-items: center; justify-content: space-between; }
  .owner-sidebar .logout-form button.secondary { width: auto; }
  .owner-topbar { top: 0; min-height: 3.7rem; }
  .owner-page { width: min(100% - 2rem, 70rem); margin-top: 1.5rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-overview { grid-template-columns: 1fr; }
  .article-list-card { grid-template-columns: 1fr; }
  .article-list-card-actions { justify-content: flex-start; }
}

@media (max-width: 42rem) {
  .owner-search-link { width: 100%; }
  .topbar-public-link { display: none; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .metric-card { min-height: 6.2rem; }
  .dashboard-aside { grid-template-columns: 1fr; }
  .editorial-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .article-primary-actions { justify-content: flex-start; }
  .public-hero h1 { font-size: clamp(1.9rem, 9vw, 2.6rem); }
}

@media (max-width: 36rem) {
  .owner-sidebar .brand { font-size: 0.95rem; }
  .owner-nav .nav-group-links { gap: 0.15rem; }
  .owner-nav a, .owner-nav .secondary-link { font-size: 0.86rem; }
  .nav-icon { display: none; }
  .owner-sidebar-footer { align-items: stretch; flex-direction: column; }
  .sidebar-public-link { min-height: 2.2rem; }
  .owner-search-link { font-size: 0.82rem; }
  .owner-page { width: calc(100% - 1.25rem); }
  .dashboard-heading { align-items: flex-start; }
  .metric-card { grid-template-columns: 3.4rem 1fr; padding: 0.9rem; }
  .quick-panel, .dashboard-section { padding: 1rem; }
  .public-shell .site-header { width: calc(100% - 1.25rem); }
  .public-page { width: calc(100% - 1.25rem); }
  .featured-card { padding: 1.05rem; }
}
