/* Likhon base styles for every page: reset, header, uploader navigation, footer. Colors come only from tokens.css.
   Public pages add site.css (scoped under .site); the uploader area adds acct.css (scoped under .acct). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--c-bg); color: var(--c-ink); font-family: var(--font-ui); font-size: 16px; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
img, svg { display: block; }
a { color: var(--c-accent); }
a:hover { color: color-mix(in srgb, var(--c-accent) 75%, var(--c-text)); }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
code, kbd, .mono { font-family: var(--font-mono); }
.icon { flex: none; }
/* Duotone icons: primary is currentColor; the secondary colour follows the tone (--icon-2), default the sel token. */
.icon .i2 { fill: var(--icon-2, var(--c-sel)); } .icon .i2s { stroke: var(--icon-2, var(--c-sel)); } .icon .ik { fill: var(--c-surface); }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.narrow { max-width: 760px; }
.muted { color: var(--c-text-2); }
.small { font-size: 13px; line-height: 20px; }
.tiny { font-size: 12px; line-height: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 10; padding: 8px 12px; border-radius: 8px; background: var(--c-accent); color: var(--c-on-accent); }
.skip:focus { top: 8px; color: var(--c-on-accent); }
.list-plain { list-style: none; padding: 0; }
.ok { color: var(--c-success); --icon-2: var(--c-greenSoft); } .warn { color: var(--c-warning); --icon-2: var(--c-amberSoft); } .bad { color: var(--c-error); --icon-2: var(--c-redSoft); } .accent { color: var(--c-accent); }
.muted .icon, .icon.muted { --icon-2: var(--c-line); }

/* Header (v2: Likhon Website.dc.html). Sticky, 64 px; nav collapses into the More menu on phones. */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--c-bg); border-bottom: 1px solid var(--c-line); }
.site-header .top { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--c-ink); text-decoration: none; }
.brand:hover { color: var(--c-ink); }
.brand .name { font-size: 21px; font-weight: 600; line-height: 1; }
.brand .latin { font-size: 15px; color: var(--c-muted); line-height: 1; }
.grow { flex: 1 1 auto; }
.site-nav { display: flex; gap: 2px; white-space: nowrap; }
.site-nav a { padding: 6px 10px; border-radius: 6px; font-size: 15px; line-height: 1.6; color: var(--c-ink); text-decoration: none; }
.site-nav a:hover { background: var(--c-surface2); color: var(--c-ink); }
.site-nav a[aria-current='page'] { background: var(--c-sel); color: var(--c-accent); font-weight: 600; }
.site-header .tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.switch { display: flex; padding: 2px; border: 1px solid var(--c-line); border-radius: 7px; background: var(--c-surface); }
.switch a { padding: 3px 9px; border-radius: 5px; font-size: 13px; line-height: 1.5; color: var(--c-ink); text-decoration: none; }
.switch a:hover { background: var(--c-surface2); color: var(--c-ink); }
.switch a[aria-current='true'] { background: var(--c-accent); color: var(--c-on); }
.sq { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--c-line); border-radius: 7px; background: var(--c-surface); color: var(--c-accent); cursor: pointer; padding: 0; }
.sq:hover { background: var(--c-surface2); }
.theme .to-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme .to-light { display: block; } :root:not([data-theme="light"]) .theme .to-dark { display: none; } }
:root[data-theme="dark"] .theme .to-light { display: block; } :root[data-theme="dark"] .theme .to-dark { display: none; }
.signin { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 7px; background: var(--c-surface); color: var(--c-ink); font-size: 14px; white-space: nowrap; text-decoration: none; }
.signin:hover { background: var(--c-surface2); color: var(--c-ink); }
.signin .icon { color: var(--c-accent); }
.menu { display: none; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; left: 0; right: 0; top: 64px; display: flex; flex-direction: column; gap: 2px; padding: 8px 16px 16px; background: var(--c-bg); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.menu-panel a { padding: 10px 8px; border-radius: 6px; font-size: 16px; color: var(--c-ink); text-decoration: none; }
.menu-panel a:hover, .menu-panel a[aria-current='page'] { background: var(--c-sel); color: var(--c-ink); }
.menu-panel .signin-m { color: var(--c-accent); font-weight: 600; }
@media (max-width: 1080px) { .brand .latin { display: none; } }
@media (max-width: 940px) {
  .site-nav, .signin { display: none; }
  .menu { display: block; }
}

/* Uploader navigation (UpNav.dc.html) */
.up-nav { background: var(--c-bg); border-bottom: 1px solid var(--c-border); }
.up-nav .inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-inline: clamp(8px, 4vw, 40px); }
.up-nav nav { flex: 1 1 auto; display: flex; gap: 2px; overflow-x: auto; white-space: nowrap; }
.up-nav nav a { flex: none; display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 12px; border-bottom: 2px solid transparent; color: var(--c-text); font-size: 15px; text-decoration: none; }
.up-nav nav a[aria-current='page'] { border-bottom-color: var(--c-accent); color: var(--c-accent); font-weight: 600; }
.badge-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--c-accent); color: var(--c-on-accent); font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.who { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; color: var(--c-text-2); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--c-accent-soft); color: var(--c-accent); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.linkish { border: 0; background: none; padding: 0; color: var(--c-accent); cursor: pointer; text-decoration: underline; font-size: 14px; }

/* Footer (v2) */
.site-footer { background: var(--c-surface2); border-top: 1px solid var(--c-line); }
.site-footer .inner { padding-top: 36px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 24px; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 24px; }
.site-footer .col { display: flex; flex-direction: column; gap: 8px; }
.site-footer .title { font-size: 13px; font-weight: 600; color: var(--c-muted); }
.site-footer .col a { font-size: 14px; color: var(--c-ink); text-decoration: none; }
.site-footer .col a:hover { color: var(--c-accent); text-decoration: underline; }
.site-footer .base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--c-line); font-size: 13px; color: var(--c-muted); }
.site-footer .about { display: flex; align-items: center; gap: 8px; }

/* Buttons used in the header on every page (pages refine them in site.css and acct.css). */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn:hover { background: var(--c-surface-2); color: var(--c-text); }
.btn-primary { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--c-accent) 88%, var(--c-text)); color: var(--c-on-accent); }

/* Site artwork slots (components/art.blade.php). One class per aspect ratio in config('likhon.artwork'). */
.art { margin: 0; overflow: hidden; border-radius: 14px; background: var(--c-surface2); border: 1px solid var(--c-line); }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.art-4x3 { aspect-ratio: 4 / 3; } .art-24x7 { aspect-ratio: 24 / 7; } .art-26x17 { aspect-ratio: 26 / 17; } .art-16x9 { aspect-ratio: 16 / 9; }
.art-3x2 { aspect-ratio: 3 / 2; } .art-16x10 { aspect-ratio: 16 / 10; } .art-32x22 { aspect-ratio: 32 / 22; } .art-15x8 { aspect-ratio: 15 / 8; } .art-7x5 { aspect-ratio: 7 / 5; }
/* Phones: wide banners become 16:9 (v2 brief §5). */
@media (max-width: 640px) { .art-24x7 { aspect-ratio: 16 / 9; } }

/* Markdown bodies (forum posts, News) */
.prose { font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 0.8em; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0; }
.prose blockquote { padding: 6px 14px; border-left: 3px solid var(--c-line); color: var(--c-muted); }
.prose code { padding: 1px 5px; border-radius: 4px; background: var(--c-surface2); font-size: 0.9em; }
.prose pre { padding: 12px; border-radius: 8px; background: var(--c-surface2); overflow-x: auto; }
.prose a { color: var(--c-accent); }

/* The designed file picker (components/file-input.blade.php): never the browser's own button. */
.filepick { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 6px; border: 1px dashed var(--c-line); border-radius: 10px; background: var(--c-surface2); font-weight: 400; }
.filepick.has-file { border-style: solid; border-color: var(--c-accent); background: var(--c-sel); }
.filepick-input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.filepick-btn { display: inline-flex; flex: none; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--c-line); border-radius: 8px; background: var(--c-surface); color: var(--c-ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.filepick-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.filepick-input:focus-visible + .filepick-btn { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.filepick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--c-muted); }
.filepick.has-file .filepick-name { color: var(--c-ink); font-weight: 600; }
