/* ==========================================================================
   Lanternloft — THEME
   All visual styling lives in this one file. To apply a new design, edit the
   variables in :root (colours, fonts, radii) or replace this file entirely.
   Class names used by app.js are listed in README.md.
   ========================================================================== */
:root {
  --font: Verdana, Geneva, "DejaVu Sans", sans-serif;
  --font-head: "Trebuchet MS", Helvetica, Arial, sans-serif;
  --fs: 13px;
  --bg: #e9ecef;
  --page: #ffffff;
  --text: #222;
  --muted: #555;
  --link: #105289;
  --link-hover: #c0392b;
  --brand: #1d3f66;          /* header / category bars */
  --brand-2: #2c5a8c;
  --brand-text: #fff;
  --row: #f2f5f9;
  --row-alt: #e8eef5;
  --border: #b8c6d6;
  --sticky: #fff8e1;
  --best: #e7f5e9;
  --best-border: #3c8d4f;
  --accent: #e0782a;
  --admin: #aa0000;
  --mod: #00702a;
  --focus: #ffbf47;
  --radius: 4px;
  --wrap: 1100px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs)/1.5 var(--font); }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 5px #000; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: #000; color: #fff; padding: .5em 1em; z-index: 10; }
.skip:focus { left: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 12px; }
main.wrap { background: var(--page); padding: 12px; border: 1px solid var(--border); border-top: 0; min-height: 60vh; }

/* Header */
.site-header { background: linear-gradient(var(--brand-2), var(--brand)); color: var(--brand-text); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--brand-text); text-decoration: none; }
.brand:hover { color: var(--brand-text); }
.logo { color: #fff; flex: none; }
.brand-name { display: block; font: bold 28px/1 var(--font-head); letter-spacing: .5px; }
.brand-tag { display: block; font-size: 12px; opacity: .9; margin-top: 4px; }
.header-search { display: flex; }
.header-search input { padding: 5px 8px; border: 1px solid #0d2540; border-radius: var(--radius) 0 0 var(--radius); width: 200px; font: inherit; }
.header-search button { border: 1px solid #0d2540; background: var(--accent); color: #fff; padding: 5px 10px; border-radius: 0 var(--radius) var(--radius) 0; font: bold 12px var(--font); cursor: pointer; }

/* Nav */
.mainnav { background: #d4dde8; border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding-top: 4px; padding-bottom: 4px; }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.mainnav li a { display: block; padding: 6px 10px; font-weight: bold; text-decoration: none; }
.mainnav li a[aria-current] { background: var(--page); border: 1px solid var(--border); border-bottom-color: var(--page); border-radius: var(--radius) var(--radius) 0 0; }
.userbox { font-size: 12px; }
.nav-toggle { display: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; font: inherit; cursor: pointer; }

/* Breadcrumbs, titles, toolbar */
.crumbs ol { list-style: none; margin: 0 0 8px; padding: 6px 8px; background: var(--row); border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; display: flex; flex-wrap: wrap; }
.crumbs li + li::before { content: "»"; margin: 0 6px; color: var(--muted); }
.page-title { font: bold 20px var(--font-head); color: var(--brand); margin: 10px 0 4px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; justify-content: space-between; }
.btn { display: inline-block; background: linear-gradient(#f7a35c, var(--accent)); color: #fff; border: 1px solid #a4521a; border-radius: var(--radius); padding: 6px 14px; font: bold 12px var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { color: #fff; filter: brightness(1.05); }
.btn-disabled { background: #999; border-color: #777; cursor: not-allowed; }
.pager { font-size: 12px; }
.pager a, .pager strong { display: inline-block; min-width: 24px; text-align: center; padding: 2px 5px; border: 1px solid var(--border); border-radius: 3px; background: var(--row); text-decoration: none; }
.pager strong { background: var(--brand); color: #fff; }
.board-intro { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Panels & tables */
.panel { border: 1px solid var(--border); border-radius: var(--radius); margin: 12px 0; overflow: hidden; background: var(--page); }
.cat-head { background: linear-gradient(var(--brand-2), var(--brand)); color: var(--brand-text); font: bold 13px var(--font-head); text-align: left; padding: 6px 10px; margin: 0; text-transform: uppercase; letter-spacing: .4px; }
.forum-table { width: 100%; border-collapse: collapse; }
.forum-table caption.cat-head { caption-side: top; }
.forum-table th { background: #cfd9e6; color: #333; font-size: 11px; text-transform: uppercase; text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.forum-table td { padding: 8px; border-bottom: 1px solid #d6dee8; vertical-align: top; background: var(--row); }
.forum-table tbody tr:nth-child(even) td { background: var(--row-alt); }
.forum-table tr.is-sticky td { background: var(--sticky); }
.c-icon { width: 36px; text-align: center; }
.c-num { width: 70px; text-align: center !important; }
.c-last { width: 210px; font-size: 11px; }
.forum-name, .topic-title { font-weight: bold; font-size: 14px; }
.forum-desc, .topic-meta, .subforums { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ficon, .ticon { display: inline-block; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fbd38d, var(--accent)); border: 2px solid #a4521a; }
.ticon-normal { background: radial-gradient(circle at 35% 35%, #dbe6f2, #8aa4c2); border-color: #5c7a9c; }
.ticon-hot { background: radial-gradient(circle at 35% 35%, #ffb199, #d1401f); border-color: #8f2410; }
.ticon-sticky { background: radial-gradient(circle at 35% 35%, #fff2b3, #e0b400); border-color: #a07f00; }
.ticon-locked { background: radial-gradient(circle at 35% 35%, #ddd, #888); border-color: #555; }
.tag { display: inline-block; font-size: 10px; font-weight: bold; text-transform: uppercase; padding: 1px 5px; border-radius: 3px; background: #cfd9e6; color: #333; }
.tag-sticky { background: #e0b400; color: #000; }
.tag-solved, .tag-best { background: var(--best-border); color: #fff; }
.empty { color: var(--muted); font-style: italic; text-align: center; }
.archive-note { font-size: 11px; color: var(--muted); }
.user-link { font-weight: bold; }
.role-administrator { color: var(--admin); }
.role-moderator { color: var(--mod); }
.stats-body { padding: 8px 10px; background: var(--row); }
.stats-body p { margin: 4px 0; }
.online-list { font-size: 12px; }

/* Avatars */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 3px; color: #fff; font: bold 11px var(--font-head); vertical-align: middle; margin-right: 6px; flex: none; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; margin: 0 0 6px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.avatar-xl { width: 96px; height: 96px; font-size: 32px; }
.member-cell { white-space: nowrap; }

/* Posts */
.post { display: grid; grid-template-columns: 170px 1fr; border: 1px solid var(--border); border-radius: var(--radius); margin: 10px 0; background: var(--row); overflow: hidden; }
.post:nth-of-type(even) { background: var(--row-alt); }
.post.is-question { border-color: var(--brand-2); }
.post.is-best { background: var(--best); border: 2px solid var(--best-border); }
.post-author { padding: 10px; border-right: 1px solid var(--border); font-size: 11px; text-align: center; }
.rank { font-style: italic; color: var(--muted); }
.pips { color: var(--accent); letter-spacing: 1px; }
.author-meta { display: grid; grid-template-columns: auto 1fr; gap: 0 6px; margin: 6px 0 0; text-align: left; }
.author-meta dt { font-weight: bold; }
.author-meta dd { margin: 0; }
.post-main { padding: 8px 12px; display: flex; flex-direction: column; min-width: 0; }
.post-head { font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.post-body { font-size: 13px; flex: 1; overflow-wrap: anywhere; }
.sig { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 4px; font-size: 11px; color: var(--muted); font-style: italic; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.vote, .mark-best { font: bold 11px var(--font); padding: 4px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--link); }
.vote[aria-pressed="true"] { background: var(--brand); color: #fff; }
.mark-best { border-color: var(--best-border); color: var(--best-border); }
.quote { font-size: 11px; }
.answers-head { font: bold 15px var(--font-head); color: var(--brand); margin: 16px 0 4px; }
.answers-head small { font-weight: normal; color: var(--muted); font-size: 11px; }

/* Forms */
form label { display: block; font-weight: bold; margin: 10px 0 3px; }
form label.check { font-weight: normal; display: flex; gap: 6px; align-items: center; }
input:not([type=checkbox]), select, textarea { width: 100%; padding: 6px 8px; border: 1px solid #8fa3ba; border-radius: 3px; font: inherit; background: #fff; }
.header-search input { width: 200px; }
.help { font-size: 11px; color: var(--muted); margin: 3px 0; }
.field-error { color: #b00020; font-weight: bold; min-height: 1em; }
.notice { padding: 10px; border: 1px solid #e0b400; background: var(--sticky); border-radius: var(--radius); margin: 10px 0; }
.narrow { max-width: 480px; }
.search-form .row { display: flex; gap: 6px; }
.plain-list { margin: 0; padding: 8px 10px 8px 28px; background: var(--row); }
.plain-list li { margin: 3px 0; }

/* Profile */
.profile-card { display: flex; gap: 16px; padding: 12px; background: var(--row); flex-wrap: wrap; align-items: flex-start; }
.profile-name { font-size: 18px; }
.profile-meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 0 auto; }
.profile-meta dt { font-weight: bold; }
.profile-meta dd { margin: 0; }
.profile-sig { margin: 0; padding: 8px 12px; background: var(--row); }
.faq h3 { font-size: 13px; margin: 12px 0 2px; color: var(--brand); }

/* Footer */
.site-footer { text-align: center; font-size: 11px; color: var(--muted); padding: 16px 0 30px; }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.demo-note { font-style: italic; }

/* Mobile */
@media (max-width: 720px) {
  .header-search, .header-search input { width: 100%; }
  .header-search input { flex: 1; }
  .brand-name { font-size: 22px; }
  .nav-toggle { display: inline-block; font: bold 12px var(--font); padding: 6px 12px; border: 1px solid var(--border); background: #fff; border-radius: var(--radius); }
  .mainnav ul { display: none; width: 100%; flex-direction: column; }
  body.nav-open .mainnav ul { display: flex; }
  .mainnav li a[aria-current] { border-bottom-color: var(--border); border-radius: var(--radius); }
  .forum-table thead { display: none; }
  .forum-table tr { display: grid; grid-template-columns: 36px 1fr auto; }
  .forum-table td { border: 0; }
  .forum-table td.c-num { display: none; }
  .forum-table td.c-last { grid-column: 2 / 4; width: auto; padding-top: 0; }
  .forum-table .c-last br { display: none; }
  .forum-table .c-last small::before { content: " · "; }
  .forum-table td.member-cell { grid-column: 1 / 3; }
  .c-hide-sm { display: none; }
  #main .forum-table:not(.topic-table) tr:has(.member-cell) { grid-template-columns: 1fr auto; }
  .post { grid-template-columns: 1fr; }
  .post-author { display: flex; gap: 10px; text-align: left; border-right: 0; border-bottom: 1px solid var(--border); align-items: center; padding: 6px 10px; }
  .avatar-lg { width: 40px; height: 40px; font-size: 15px; margin: 0; }
  .author-meta { display: none; }
  .profile-meta { margin-left: 0; }
}

/* Demo comparison thread */
.demo-banner { margin: 12px 0; padding: 10px 12px; background: #fff3cd; border: 2px solid #b8860b; border-left-width: 8px; border-radius: var(--radius); color: #3d2e00; font-size: 14px; font-weight: bold; }
.demo-banner strong { text-transform: uppercase; color: #8a1c00; }
.tag-demo { background: #b8860b; color: #fff; }
.table-scroll { overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); max-width: 100%; }
.compare-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 12px; }
.compare-table caption { text-align: left; font-weight: bold; padding: 6px 8px; background: var(--row-alt); }
.compare-table th, .compare-table td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: top; }
.compare-table thead th { background: var(--brand); color: var(--brand-text); }
.compare-table tbody tr:nth-child(even) { background: var(--row); }
.compare-table tr.is-mac { background: #eef7ee; }
.compare-table th:nth-child(5), .compare-table td[data-label="Price"] { white-space: nowrap; width: 1%; }
.os { display: inline-block; font-size: 10px; font-weight: bold; padding: 1px 5px; border-radius: 3px; margin: 0 3px 3px 0; color: #fff; }
.os-mac { background: #333; } .os-win { background: #1f6fb2; }
.stars { white-space: nowrap; color: #b8860b; } .stars b { color: var(--text); }
.mock-head { font: bold 15px var(--font-head); margin: 18px 0 8px; }
.mock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.mock-shot { margin: 0; border: 1px solid var(--border); background: var(--row); padding: 6px; }
.mock-shot img { display: block; width: 100%; height: auto; border: 1px solid #ccc; }
.mock-shot figcaption { font-size: 12px; margin-top: 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.mock-label { display: inline-block; background: #333; color: #fff; font-size: 10px; text-transform: uppercase; padding: 1px 5px; border-radius: 3px; }
.product-stats { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0 4px; width: 100%; font-size: 12px; }
.product-stats div { display: contents; }
.product-stats dt { color: var(--muted); font-weight: normal; }
.product-stats dd { margin: 0; }
.mock-shot .buy-btn { margin-top: 4px; }
.post-main { min-width: 0; }
.os { white-space: nowrap; }
@media (max-width: 720px) {
  .table-scroll { overflow: visible; border: 0; }
  .compare-table { min-width: 0; }
  .compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table th, .compare-table td { display: block; width: 100%; }
  .compare-table caption { display: block; }
  .compare-table tr { border: 1px solid var(--border); margin-bottom: 8px; }
  .compare-table th, .compare-table td { border: 0; border-top: 1px solid var(--border); padding: 5px 8px; }
  .compare-table th[scope=row] { font-size: 13px; background: var(--row-alt); border-top: 0; }
  .compare-table td[data-label="#"] { display: none; }
  .compare-table td::before { content: attr(data-label) ": "; font-weight: bold; color: var(--muted); }
}
