/* Public (reader-facing) site. Editorial, light, one accent colour. */
body.site {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site main { flex: 1; }
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .container { padding-inline: 32px; } }

a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgb(251 250 247 / 0.9);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header__bar { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--font-display);
  font-weight: 650; font-size: 1.5rem; letter-spacing: -0.02em; font-variation-settings: "opsz" 72; }
.brand img { height: 32px; width: auto; }
.brand__dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); display: inline-block;
  transform: translateY(.35rem); margin-left: -.35rem; }
.site-nav { display: none; gap: .25rem; margin-left: .5rem; }
.site-nav a { padding: .45rem .7rem; border-radius: 999px; text-decoration: none; color: var(--ink-2);
  font-size: .925rem; font-weight: 500; transition: background .15s, color .15s; }
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 0;
  background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; transition: background .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.btn-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 999px;
  font-size: .9rem; font-weight: 600; text-decoration: none; border: 1px solid var(--ink); color: var(--ink);
  background: transparent; cursor: pointer; transition: background .15s, color .15s; }
.btn-pill:hover { background: var(--ink); color: var(--paper); }
.btn-pill--solid { background: var(--ink); color: var(--paper); }
.btn-pill--solid:hover { background: var(--accent); border-color: var(--accent); }
.menu-toggle { display: inline-grid; }
@media (min-width: 900px) {
  .site-nav { display: flex; }
  .menu-toggle { display: none; }
}
.mobile-nav { border-top: 1px solid var(--line); padding: .75rem 0 1.25rem; }
.mobile-nav a { display: block; padding: .7rem 0; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .mobile-nav { display: none !important; } }

.search-overlay { position: fixed; inset: 0; z-index: 60; background: rgb(23 22 28 / 0.45); display: grid;
  align-items: start; justify-items: center; padding: 12vh 16px 0; }
.search-overlay__panel { width: min(640px, 100%); background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 1rem; }
.search-overlay form { display: flex; align-items: center; gap: .75rem; }
.search-overlay input { flex: 1; border: 0; font-size: 1.25rem; padding: .6rem .25rem; background: transparent; }
.search-overlay input:focus { outline: none; }
.search-overlay__hint { margin: .5rem .25rem 0; color: var(--muted); font-size: .85rem; }

/* ---------- Typography helpers ---------- */
.kicker { display: inline-flex; align-items: center; gap: .45rem; font-size: .75rem; font-weight: 650;
  letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink); text-decoration: none; }
a.kicker:hover { color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; color: var(--muted); font-size: .85rem; }
.meta__sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.meta a { text-decoration: none; color: var(--ink-2); font-weight: 550; }
.meta a:hover { color: var(--accent-ink); }
.section-head { display: flex; align-items: baseline; gap: 1rem; margin: 0 0 1.5rem; }
.section-head h2 { margin: 0; font-family: var(--font-sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: var(--ink); white-space: nowrap; }
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.section-head a { order: 2; font-size: .85rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.section-head a:hover { color: var(--accent-ink); }
.page-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.08; letter-spacing: -0.025em; margin: .35rem 0 .75rem; font-variation-settings: "opsz" 144; }
.page-lead { color: var(--ink-2); font-size: 1.1rem; max-width: 46rem; margin: 0; }
.page-header { padding: 3rem 0 2rem; border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; }

/* ---------- Media frame ---------- */
.frame { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--radius); }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.frame--placeholder { display: grid; place-items: center; color: var(--faint);
  background: linear-gradient(135deg, var(--surface-2), var(--accent-soft)); }
.frame--placeholder span { font-family: var(--font-display); font-size: 2.5rem; opacity: .5; }
a:hover .frame img, .card:hover .frame img { transform: scale(1.03); }

/* ---------- Hero ---------- */
.hero { padding-block: 2.5rem 3rem; }
.hero__grid { display: grid; gap: 1.75rem; align-items: center; }
.hero__media { aspect-ratio: 16 / 10; display: block; }
.hero__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4.6vw, 3.5rem);
  line-height: 1.04; letter-spacing: -0.03em; margin: .6rem 0 1rem; font-variation-settings: "opsz" 144; }
.hero__title a { text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 2px; background-position: 0 92%; background-repeat: no-repeat; transition: background-size .35s var(--ease); }
.hero__title a:hover { background-size: 100% 2px; }
.hero__excerpt { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); margin: 0 0 1.25rem; }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 7fr 5fr; gap: 3rem; }
}

/* ---------- Spotlight (secondary featured) ---------- */
.spotlight { padding-bottom: 3rem; }
.spotlight__list { display: grid; gap: 1.5rem; list-style: none; margin: 0; padding: 0; counter-reset: spot; }
.spotlight__item { display: grid; grid-template-columns: auto 1fr; gap: 1rem; counter-increment: spot;
  padding-top: 1.25rem; border-top: 1px solid var(--line); }
.spotlight__item::before { content: counter(spot, decimal-leading-zero); font-family: var(--font-display);
  font-size: 2rem; line-height: 1; color: var(--accent); font-weight: 500; }
.spotlight__item h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.25;
  letter-spacing: -0.01em; margin: .3rem 0 .4rem; }
.spotlight__item h3 a { text-decoration: none; }
.spotlight__item h3 a:hover { color: var(--accent-ink); }
@media (min-width: 768px) { .spotlight__list { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

/* ---------- Layout with sidebar ---------- */
.with-sidebar { display: grid; gap: 3rem; padding-bottom: 4rem; }
@media (min-width: 1024px) { .with-sidebar { grid-template-columns: minmax(0, 1fr) 300px; gap: 4rem; } }
.sidebar { display: grid; gap: 2rem; align-content: start; }
@media (min-width: 1024px) { .sidebar { position: sticky; top: 88px; } }
.widget h2 { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; margin: 0 0 .9rem; }
.widget--box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.widget--about p { font-family: var(--font-serif); color: var(--ink-2); margin: 0 0 1rem; font-size: 1.02rem; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list a { display: flex; justify-content: space-between; align-items: center; padding: .6rem 0;
  border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; transition: color .15s, padding .2s var(--ease); }
.cat-list a:hover { color: var(--accent-ink); padding-left: .25rem; }
.cat-list .count { font-size: .78rem; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: .1rem .55rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag { display: inline-flex; align-items: center; padding: .3rem .7rem; border-radius: 999px; font-size: .82rem;
  text-decoration: none; color: var(--ink-2); border: 1px solid var(--line-strong); background: var(--surface);
  transition: border-color .15s, color .15s, background .15s; }
.tag:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 2.5rem 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; gap: .8rem; position: relative; animation: rise .45s var(--ease) both; }
.card__media { aspect-ratio: 16 / 10; display: block; }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.32rem; line-height: 1.22;
  letter-spacing: -0.015em; margin: 0; font-variation-settings: "opsz" 48; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:hover { color: var(--accent-ink); }
.card__excerpt { margin: 0; color: var(--ink-2); font-size: .96rem; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; }
.card .kicker, .card .meta a { position: relative; z-index: 1; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card--row { display: grid; grid-template-columns: 1fr; gap: 1rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .card--row { grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: start; } }

/* ---------- Load more & pagination ---------- */
.load-more { display: flex; justify-content: center; margin-top: 3rem; grid-column: 1 / -1; }
.btn-outline { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.6rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); text-decoration: none; font-weight: 600;
  font-size: .92rem; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.btn-outline:hover { border-color: var(--ink); box-shadow: var(--shadow-sm); }
.pagination { display: flex; justify-content: center; align-items: center; gap: .35rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 .75rem;
  border-radius: 999px; text-decoration: none; font-size: .92rem; font-weight: 550; }
.pagination a:hover { background: var(--surface-2); }
.pagination [aria-current="page"] { background: var(--ink); color: var(--paper); }
.pagination .disabled { color: var(--faint); }

/* ---------- Filter chips ---------- */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 2rem; scrollbar-width: thin; }
.chip { flex: none; padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none;
  font-size: .88rem; font-weight: 550; color: var(--ink-2); background: var(--surface); transition: all .15s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 4rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
  background: var(--surface); grid-column: 1 / -1; }
.empty__icon { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft);
  color: var(--accent-ink); margin-bottom: 1rem; }
.empty h2, .empty h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin: 0 0 .4rem; }
.empty p { color: var(--muted); margin: 0 auto 1.25rem; max-width: 30rem; }

/* ---------- Article ---------- */
.article-header { max-width: 820px; margin: 0 auto; padding: 2.5rem 0 2rem; text-align: center; }
.breadcrumb { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.5rem;
  font-size: .82rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--faint); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-ink); }
.article-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.1rem, 5.4vw, 3.75rem);
  line-height: 1.05; letter-spacing: -0.03em; margin: .75rem 0 1.25rem; font-variation-settings: "opsz" 144; }
.article-dek { font-family: var(--font-serif); font-size: clamp(1.1rem, 2.2vw, 1.35rem); line-height: 1.5; color: var(--ink-2);
  margin: 0 auto 1.75rem; max-width: 680px; }
.byline { display: inline-flex; align-items: center; gap: .75rem; text-align: left; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); color: var(--accent-ink);
  display: inline-grid; place-items: center; font-weight: 700; flex: none; }
.avatar--lg { width: 72px; height: 72px; font-size: 1.5rem; }
.byline__name { font-weight: 650; text-decoration: none; }
.byline__name:hover { color: var(--accent-ink); }
.article-cover { max-width: 1120px; margin: 0 auto 3rem; }
.article-cover .frame { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }
.article-cover figcaption { text-align: center; color: var(--muted); font-size: .85rem; margin-top: .75rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 1100px) {
  .article-layout { grid-template-columns: 1fr minmax(0, 700px) 1fr; gap: 3rem; }
  .article-layout > .article-body { grid-column: 2; }
  .article-layout > .toc { grid-column: 3; grid-row: 1; position: sticky; top: 96px; align-self: start; }
}
.article-body { max-width: 700px; width: 100%; margin: 0 auto; }
.toc { font-size: .88rem; border-left: 2px solid var(--line); padding-left: 1rem; max-width: 700px; width: 100%; margin: 0 auto; }
.toc h2 { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .75rem; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.toc a { text-decoration: none; color: var(--ink-2); display: block; line-height: 1.4; transition: color .15s; }
.toc a:hover, .toc a.is-active { color: var(--accent-ink); }
.toc .lvl-3 { padding-left: .85rem; font-size: .84rem; }
@media (max-width: 1099px) {
  .toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; background: var(--surface); }
}

.prose { font-family: var(--font-serif); font-size: 1.18rem; line-height: 1.78; color: var(--ink); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.35em; }
.prose p { margin-bottom: 0; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2;
  scroll-margin-top: 96px; margin-bottom: 0; }
.prose h2 { font-size: 1.85rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.4rem; margin-top: 1.8em; }
.prose h4 { font-size: 1.15rem; margin-top: 1.6em; font-family: var(--font-sans); }
.prose a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: rgb(180 68 28 / .4); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 0; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin-left: 0; margin-right: 0; padding: .25em 0 .25em 1.25em; border-left: 3px solid var(--accent);
  font-style: italic; color: var(--ink-2); font-size: 1.12em; }
.prose blockquote p + p { margin-top: .8em; }
.prose img { border-radius: var(--radius); margin-inline: auto; }
.prose figure { margin-inline: 0; }
.prose figcaption { font-family: var(--font-sans); font-size: .85rem; color: var(--muted); text-align: center; margin-top: .6rem; }
.prose hr { border: 0; text-align: center; margin: 2.5em 0; }
.prose hr::before { content: "· · ·"; letter-spacing: .6em; color: var(--faint); }
.prose code { font-family: var(--font-mono); font-size: .84em; background: var(--surface-2); padding: .12em .38em; border-radius: 4px; }
.prose pre { font-family: var(--font-mono); font-size: .86rem; line-height: 1.65; background: #1d1c23; color: #ece9e2;
  padding: 1.15rem 1.3rem; border-radius: var(--radius); overflow-x: auto; }
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.prose > p:first-of-type::first-letter { font-family: var(--font-display); float: left; font-size: 3.6em; line-height: .9;
  padding: .06em .1em 0 0; color: var(--accent); font-weight: 600; }

.article-foot { max-width: 700px; margin: 3rem auto 0; display: grid; gap: 2rem; }
.article-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.share { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: 1.25rem 0; border-block: 1px solid var(--line); }
.share__label { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-right: .5rem; }
.share .icon-btn { border: 1px solid var(--line-strong); }
.share .icon-btn:hover { border-color: var(--ink); }
.share__copied { font-size: .85rem; color: var(--success); }
.author-box { display: flex; gap: 1.25rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); }
.author-box h2 { font-size: 1.05rem; margin: 0 0 .3rem; }
.author-box h2 a { text-decoration: none; }
.author-box p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.related { padding: 4rem 0; margin-top: 4rem; background: var(--surface); border-top: 1px solid var(--line); }

.preview-banner { position: sticky; top: 0; z-index: 50; background: var(--warning-soft); color: var(--warning);
  border-bottom: 1px solid #ecd7a6; font-size: .9rem; }
.preview-banner .container { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding-block: .6rem; flex-wrap: wrap; }
.preview-banner a { font-weight: 650; }

/* ---------- Author page ---------- */
.author-hero { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.author-hero .avatar { width: 96px; height: 96px; font-size: 2rem; }

/* ---------- Search ---------- */
.search-hero { padding: 3rem 0 2rem; }
.search-field { display: flex; align-items: center; gap: .75rem; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: .4rem .4rem .4rem 1.25rem; box-shadow: var(--shadow-sm); max-width: 720px; transition: border-color .15s, box-shadow .15s; }
.search-field:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.search-field input { flex: 1; border: 0; background: transparent; font-size: 1.1rem; padding: .55rem 0; min-width: 0; }
.search-field input:focus { outline: none; }
.search-field button { border: 0; background: var(--ink); color: var(--paper); border-radius: 999px; padding: .7rem 1.3rem;
  font-weight: 600; cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; }
.search-field button:hover { background: var(--accent); }
.search-summary { color: var(--muted); margin: 1rem 0 2rem; }
.search-results { display: grid; gap: 2rem; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 5rem; background: var(--ink); color: #cfccd6; padding: 4rem 0 2rem; font-size: .92rem; }
.site-footer a { color: #e9e6ef; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid h2 { color: #fff; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-about p { max-width: 26rem; margin: 1rem 0; color: #b9b5c2; }
.footer-social { display: flex; gap: .5rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid #3c3a45; }
.footer-social a:hover { border-color: #fff; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #33313b; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; color: #8f8b99; font-size: .85rem; }

/* ---------- Messages ---------- */
.flash { margin: 1rem auto 0; }
.flash__item { padding: .8rem 1rem; border-radius: var(--radius); background: var(--info-soft); color: var(--info); font-size: .92rem; }
.flash__item--success { background: var(--success-soft); color: var(--success); }
.flash__item--error { background: var(--danger-soft); color: var(--danger); }

/* ---------- Error pages & auth ---------- */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.error-page__code { font-family: var(--font-display); font-size: clamp(5rem, 16vw, 9rem); line-height: 1; color: var(--accent);
  font-weight: 500; letter-spacing: -0.04em; margin: 0; }
.error-page h1 { font-family: var(--font-display); font-weight: 600; font-size: 2rem; margin: .5rem 0; }
.error-page p { color: var(--muted); max-width: 32rem; margin: 0 auto 1.75rem; }
.error-page__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 960px) { .auth-wrap { grid-template-columns: 1.1fr 1fr; } }
.auth-aside { display: none; background: var(--ink); color: #e9e6ef; padding: 3rem; position: relative; overflow: hidden; }
@media (min-width: 960px) { .auth-aside { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-aside .brand { color: #fff; }
.auth-aside blockquote { font-family: var(--font-display); font-size: 2.1rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0; max-width: 30rem; }
.auth-aside cite { display: block; margin-top: 1rem; font-family: var(--font-sans); font-style: normal; color: #a19dab; font-size: .9rem; }
.auth-aside::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -180px; bottom: -200px;
  background: radial-gradient(circle, rgb(180 68 28 / .55), transparent 65%); }
.auth-main { display: grid; place-items: center; padding: 2rem 16px; }
.auth-card { width: min(400px, 100%); }
.auth-card h1 { font-family: var(--font-display); font-weight: 600; font-size: 2rem; letter-spacing: -0.02em; margin: 0 0 .4rem; }
.auth-card > p { color: var(--muted); margin: 0 0 2rem; }
.form-field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.form-field label { font-weight: 600; font-size: .9rem; }
.form-field input { padding: .75rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s, box-shadow .15s; }
.form-field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.form-error { background: var(--danger-soft); color: var(--danger); padding: .75rem 1rem; border-radius: var(--radius); font-size: .9rem; margin-bottom: 1.25rem; }
.btn-block { width: 100%; justify-content: center; padding: .85rem 1rem; font-size: 1rem; }

/* ---- Shop -------------------------------------------------------------- */
.product-card__body { display: grid; gap: .6rem; }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem .75rem; }
.price { font-family: var(--font-sans); font-weight: 700; font-variant-numeric: tabular-nums; }
.price--old { color: var(--muted); font-weight: 500; }
.price-row--lg .price { font-size: 1.6rem; }
.stock { font-size: .9rem; font-weight: 600; }
.stock--in { color: var(--success); }
.stock--out { color: var(--danger); }

.product-detail { display: grid; gap: 2rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
.product-detail__media { aspect-ratio: 4 / 3; }
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__info { display: grid; gap: 1rem; align-content: start; }
.product-detail__facts { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.product-detail__facts li { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.product-detail__facts span { color: var(--muted); }
.product-detail__description { margin-top: 2.5rem; max-width: 70ch; }
.add-to-cart { display: grid; gap: .75rem; max-width: 26rem; }
.add-to-cart .qty { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.add-to-cart .shop-input { max-width: 8rem; }

.cart, .checkout { display: grid; gap: 2rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
.cart__lines { display: grid; gap: 1rem; }
.cart-line { display: grid; grid-template-columns: 96px 1fr auto; gap: 1rem; align-items: center;
  padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.cart-line__media { aspect-ratio: 4 / 3; }
.cart-line__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__info { display: grid; gap: .25rem; min-width: 0; }
.cart-line__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .4rem; }
.qty-form { display: flex; gap: .5rem; align-items: center; }
.qty-form .shop-input { width: 6rem; }
.cart-line__total { font-weight: 700; white-space: nowrap; }
.cart__summary { display: grid; gap: 1rem; align-content: start; padding: 1.25rem; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface); }
.summary-row { display: flex; justify-content: space-between; font-size: 1.05rem; }
.order-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .95rem; }
.order-lines li { display: flex; justify-content: space-between; gap: 1rem; }
.order-meta { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; font-size: .92rem; margin: 0; }
.order-meta dt { color: var(--muted); }
.order-meta dd { margin: 0; }
.checkout__form fieldset { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; }
.checkout__form legend { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.checkout__form textarea { width: 100%; padding: .75rem .9rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--surface); font: inherit; }
.checkout__form .field__help { color: var(--muted); font-size: .85rem; }
.checkout__form .field__error { color: var(--danger); font-size: .88rem; }

@media (min-width: 900px) {
  .product-detail { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .cart { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); align-items: start; }
  .checkout { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); align-items: start; }
}
.cart-link { position: relative; }
.cart-link__count { position: absolute; top: -.2rem; right: -.2rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem;
  border-radius: 999px; background: var(--accent); color: var(--paper); font-size: .7rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.shop-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.75rem;
  padding: .7rem 1.25rem; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper);
  font: 600 .95rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.shop-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.shop-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.shop-btn--ghost { background: transparent; color: var(--ink); }
.shop-btn--ghost:hover { background: var(--surface-2); border-color: var(--ink); color: var(--ink); }
.shop-btn--sm { min-height: 2.2rem; padding: .45rem .9rem; font-size: .85rem; }
.shop-btn--block { width: 100%; }
.shop-input { width: 100%; min-height: 2.6rem; padding: .6rem .8rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; }
.shop-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.shop-crumbs { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-start; text-align: left;
  font-size: .85rem; color: var(--muted); margin-top: 1.25rem; }
.shop-crumbs a { color: inherit; }
.shop-crumbs a:hover { color: var(--ink); }
.cart-line a, .cart__lines a { color: var(--ink); text-decoration: none; }
.cart-line a:hover { color: var(--accent); }
.cart-title { font-size: 1.1rem; margin: 0; font-family: var(--font-display); }

/* Storefront polish: placeholders, description typography, related block, responsive facts. */
.product-card .frame--placeholder, .product-detail__media.frame--placeholder, .cart-line__media.frame--placeholder {
  display: grid; place-items: center; background: var(--surface-2); color: var(--muted);
  font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 600; }
.product-detail__media.frame--placeholder span { font-size: clamp(3rem, 9vw, 6rem); }
.product-detail__description { margin-top: 2.5rem; max-width: 68ch; font-size: 1.05rem; line-height: 1.7; }
.product-detail__description p { margin: 0 0 1rem; }
.product-detail__description ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.product-detail__description li + li { margin-top: .35rem; }
.product-detail__facts li { display: grid; grid-template-columns: minmax(7rem, 9rem) 1fr; gap: 1rem; }
.product-detail__facts strong { font-weight: 600; }
.shop-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.shop-related__title { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 1.5rem; }

/* Đã đăng (apps/social/public.py): published social posts */
.published__thumb { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.published__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; pointer-events: none; }
.published__play .icon { width: 3rem; height: 3rem; padding: .8rem; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.published__player { aspect-ratio: 16 / 9; background: #000; }
.published__player video { width: 100%; height: 100%; display: block; object-fit: contain; }
.published__pictures { display: grid; gap: 1rem; }
.published__links { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
