/* public/css/site.css — SITE styles; every colour comes from --site-* variables set by common.js */
:root { /* Default values used until the theme loads */
--site-primary: #0b5394; /* Buttons, links */
--site-primaryText: #ffffff; /* Text on primary */
--site-accent: #f1c232; /* Highlights */
--site-background: #f4f6f9; /* Page background */
--site-surface: #ffffff; /* Cards */
--site-text: #1d2733; /* Body text */
--site-muted: #5f6b7a; /* Secondary text */
--site-border: #d5dbe3; /* Borders */
--site-headerBg: #0b2545; /* Header background */
--site-headerText: #ffffff; /* Header text */
--site-success: #2e7d32; /* Success states */
--site-danger: #c62828; /* Errors */
--site-warning: #ed6c02; /* Warnings */
} /* End root */
* { box-sizing: border-box; } /* Predictable sizing */
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--site-background); color: var(--site-text); line-height: 1.5; display: flex; flex-direction: column; min-height: 100vh; } /* Base page */
a { color: var(--site-primary); } /* Links */
#site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1.48vw; padding: .78vh 1.35vw; background: var(--site-headerBg); color: var(--site-headerText); flex-wrap: wrap; } /* Header bar */
.brand { display: flex; align-items: center; gap: .68vw; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.34rem; } /* Logo + name */
.brand .logo img { height: 3.7vh; width: auto; display: block; } /* Logo size */
.site-nav { display: flex; align-items: center; gap: 1.35vw; flex-wrap: wrap; } /* Nav row */
.site-nav a, .site-nav .link-btn { color: var(--site-headerText); text-decoration: none; opacity: .9; } /* Nav links */
.site-nav a.current { border-bottom: 2px solid var(--site-accent); opacity: 1; } /* Current page */
.site-nav .who { opacity: .75; font-size: 1.04rem; } /* Username */
.link-btn { background: none; border: 0; cursor: pointer; font: inherit; padding: 0; } /* Button styled as link */
.badge { display: inline-block; min-width: 1.3em; padding: 0 .38em; border-radius: 999px; background: var(--site-accent); color: #000; font-size: .75rem; text-align: center; } /* Count bubble */
main.container { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 1.65vh 1.35vw; } /* Content column */
main.narrow { max-width: 460px; } /* Login/register width */
#site-footer { padding: 1.25vh 1.35vw; text-align: center; color: var(--site-muted); font-size: .9rem; border-top: 1px solid var(--site-border); } /* Footer */
.hero { padding: 2rem 0 1rem; } /* Home banner */
.hero h1 { margin: 0 0 .5rem; font-size: 2rem; } /* Headline */
.hero p { color: var(--site-muted); max-width: 60ch; } /* Sub-headline */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.15vh; } /* Card grid */
.card { background: var(--site-surface); border: 1px solid var(--site-border); border-radius: 10px; padding: 1.37vh; } /* Card */
.card h3 { margin-top: 0; } /* Card title */
.price { font-size: 1.3rem; font-weight: 700; } /* Price line */
.price small { font-size: .8rem; font-weight: 400; color: var(--site-muted); } /* Price note */
.card-actions { display: flex; gap: .65vw; flex-wrap: wrap; margin-top: 1.15vh; } /* Card buttons */
.btn { display: inline-block; background: var(--site-primary); color: var(--site-accent); border: 0; border-radius: 6px; padding: .62rem 1.15rem; font: inherit; cursor: pointer; text-decoration: none; } /* Primary button */
.btn:disabled { opacity: .5; cursor: not-allowed; background: var(--site-background); color: var(--site-muted) } /* Disabled */
.btn-secondary { background: transparent; color: var(--site-accent); border: 1px solid var(--site-accent); } /* Outline button */
.btn-small { padding: .3rem .7rem; font-size: .9rem; color: var(--site-accent);} /* Compact button */
.btn-danger { background: var(--site-danger); } /* Destructive */
.status { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 600; } /* Status pill */
.status.ok { background: color-mix(in srgb, var(--site-success) 15%, transparent); color: var(--site-success); } /* Active */
.status.info { background: color-mix(in srgb, var(--site-primary) 12%, transparent); color: var(--site-primary); } /* Unused */
.status.bad { background: color-mix(in srgb, var(--site-danger) 12%, transparent); color: var(--site-danger); } /* Expired */
.status.muted { background: var(--site-border); color: var(--site-muted); } /* Not purchased */
.form { display: flex; flex-direction: column; gap: 1vh; } /* Stacked form */
.form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; } /* Field label */
input, textarea, select { font: inherit; padding: .5rem .6rem; border: 1px solid var(--site-border); border-radius: 6px; background: #fff; color: #111; } /* Inputs */
textarea { min-height: 120px; font-family: ui-monospace, monospace; font-size: .85rem; } /* Code areas */
.notice { padding: .7rem 1.1rem; border-radius: 6px; background: color-mix(in srgb, var(--site-warning) 15%, transparent); border-left: 4px solid var(--site-warning); } /* Info box */
.error { color: var(--site-danger); } /* Error text */
.success { color: var(--site-success); } /* Success text */
table { width: 100%; border-collapse: collapse; background: var(--site-surface); } /* Tables */
th, td { padding: .6rem .7rem; border-bottom: 1px solid var(--site-border); text-align: left; vertical-align: middle; } /* Cells */
th { font-size: .85rem; color: var(--site-muted); text-transform: uppercase; letter-spacing: .03em; } /* Headings */
.table-wrap { overflow-x: auto; margin-bottom: 1.65vh; } /* Scroll on mobile */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25vh; margin-bottom: 1.65vh; } /* Summary tiles */
.stat-cards .card strong { display: block; font-size: 1.6rem; } /* Big number */
.idle-banner { position: fixed; bottom: 1.5vh; left: 50%; transform: translateX(-50%); background: var(--site-warning); color: #000; padding: .88vh 1.35vw; border-radius: 8px; z-index: 99; box-shadow: 0 4px 16px rgba(0,0,0,.25); } /* Idle warning */
.qr img { width: 200px; height: 200px; } /* 2FA QR code */
.color-row { display: grid; grid-template-columns: 1fr 48px 110px; align-items: center; gap: .57vh; padding: .25rem 0; } /* Colour editor row */
.color-row input[type=color] { width: 48px; height: 36px; padding: 0; border: 1px solid var(--site-border); } /* Picker */
.hex-input.invalid { border-color: var(--site-danger); outline: 2px solid var(--site-danger); } /* Bad hex */
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.65vh; } /* Two-column editor */
.svg-preview { min-height: 70px; display: flex; align-items: center; padding: .5rem; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 1px solid var(--site-border); border-radius: 6px; } /* Checkerboard preview */
.svg-preview img { max-height: 60px; } /* Preview size */
fieldset { border: 1px solid var(--site-border); border-radius: 8px; padding: .8rem 1.1rem; margin: 0 0 1rem; } /* Grouping */
legend { font-weight: 700; padding: 0 .4rem; } /* Group title */
.mod-preview { border: 1px solid var(--site-border); border-radius: 8px; overflow: hidden; font-size: .85rem; } /* Mini module mock-up */
.mod-preview .p-head { display: flex; gap: .57vh; align-items: center; padding: .5rem; background: var(--mod-headerBg); color: var(--mod-headerText); font-weight: 700; } /* Mock header */
.mod-preview .p-body { display: flex; min-height: 160px; } /* Mock body */
.mod-preview .p-side { width: 40%; background: var(--mod-sidebarBg); color: var(--mod-sidebarText); padding: .5rem; } /* Mock sidebar */
.mod-preview .p-ch { background: var(--mod-chapterBg); color: var(--mod-chapterText); padding: .35rem; border-radius: 4px; margin-bottom: .3rem; } /* Mock chapter */
.mod-preview .p-ch.on { background: var(--mod-chapterActiveBg); } /* Mock active chapter */
.mod-preview .p-seg { background: var(--mod-segmentBg); color: var(--mod-segmentText); padding: .25rem .5rem; margin: .2rem 0 .2rem .6rem; border-radius: 4px; } /* Mock segment */
.mod-preview .p-view { flex: 1; background: var(--mod-viewportBg); color: var(--mod-text); padding: .6rem; } /* Mock viewport */
.mod-preview .p-btn { display: inline-block; background: var(--mod-primary); color: var(--mod-primaryText); padding: .2rem .6rem; border-radius: 4px; } /* Mock button */
@media (max-width: 760px) { .editor-grid { grid-template-columns: 1fr; } .hero h1 { font-size: 1.5rem; } } /* Mobile layout */
