/*
 * ScanSimple Help Center (help-center/, docs/help-center.md) — its own
 * stylesheet; nothing here reaches the Laravel app's pages. Colours, radii
 * and type follow the marketing site: home-refresh.css and
 * marketing-trial.css.
 */

/* Type is the KERNO brand face (Montserrat) via --font-sans, from
   /brand/kerno-type.css -- the help-center layouts link it first. */

:root {
    --ink: #18333E;          /* brand ink: headings, header bar */
    --ink-soft: #4A5A65;     /* body copy on white */
    --ink-mute: #6B7C8A;     /* meta text */
    --teal: #0F6E66;         /* links and small accents (AA on white) */
    --teal-dark: #17867A;    /* brand deep teal */
    --teal-bright: #5FC4BB;  /* pill buttons, with ink text */
    --mint: #A8E4DF;         /* button hover, accents on dark */
    --green: #18A195;        /* start of the brand gradient */
    --bg: #F4F8F8;
    --card: #ffffff;
    --line: #E1EBEB;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 1px 2px rgba(24, 51, 62, 0.05), 0 14px 34px -16px rgba(24, 51, 62, 0.24);
    --shadow-lg: 0 1px 2px rgba(24, 51, 62, 0.06), 0 26px 56px -22px rgba(19, 44, 54, 0.42);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.25; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* header — the ink bar the portal and marketing site sit on */
.site-header { background: var(--ink); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 16px 20px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; font-weight: 500; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { height: 30px; width: auto; display: block; }
.brand span { border-left: 1px solid rgba(255, 255, 255, 0.24); padding-left: 14px; color: rgba(255, 255, 255, 0.78); font-size: 15px; }
.header-nav { margin-left: auto; flex-shrink: 0; }
.header-nav a { color: rgba(255, 255, 255, 0.82); font-size: 14px; }
.header-nav a:hover { color: #fff; text-decoration: none; }
.header-pill {
    display: inline-block; padding: 8px 18px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.34); font-weight: 500;
    transition: background 0.15s, border-color 0.15s;
}
.header-pill:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.55); }
.header-search { flex: 1; max-width: 400px; }
.site-header .header-search input {
    width: 100%; border-radius: 999px; padding: 9px 18px 9px 40px;
    background: rgba(255, 255, 255, 0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23A8E4DF' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5.5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat 15px center;
    border: 1px solid rgba(255, 255, 255, 0.18); color: #fff;
}
.site-header .header-search input::placeholder { color: rgba(255, 255, 255, 0.6); }
.site-header .header-search input:focus { outline: 2px solid var(--teal-bright); outline-offset: -1px; background-color: rgba(255, 255, 255, 0.12); }

/* hero — the home page's teal-to-ink gradient */
.hero {
    background: linear-gradient(45deg, var(--green) 0%, var(--ink) 60%, #282A2B 100%);
    color: #fff; padding: 72px 0 84px; text-align: center;
}
.hero h1 { margin: 0 0 10px; font-size: 46px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.08; }
.hero p { margin: 0 0 32px; color: #DDEFEF; font-size: 18px; }
.hero-search { max-width: 600px; margin: 0 auto; position: relative; }
.hero .hero-search input {
    width: 100%; padding: 18px 24px 18px 54px; font-size: 17px; border: none; border-radius: 999px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2317867A' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='6.5'/%3E%3Cpath d='m13.5 13.5 4.5 4.5'/%3E%3C/svg%3E") no-repeat 22px center;
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.6);
}
.hero .hero-search input:focus { outline: 3px solid var(--mint); outline-offset: 2px; }

input[type="search"], input[type="text"], input[type="password"], select, textarea {
    padding: 10px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal-dark); outline-offset: -1px; }

/* search suggestions */
.suggest-box {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 20;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); overflow: hidden; text-align: left;
}
.suggest-box a { display: block; padding: 11px 18px; border-bottom: 1px solid var(--line); color: var(--ink); }
.suggest-box a:last-child { border-bottom: none; }
.suggest-box a:hover { background: var(--bg); text-decoration: none; }
.suggest-box .s-title { display: block; font-weight: 700; font-size: 14px; }
.suggest-box .s-cat { display: block; font-size: 12px; color: var(--ink-mute); }

/* sections */
.section { padding: 48px 0 8px; }
.section h2 { font-size: 26px; margin: 0 0 20px; font-weight: 700; letter-spacing: -0.03em; }

/* category grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.cat-card {
    display: flex; flex-direction: column; background: var(--card); border: 1px solid rgba(24, 51, 62, 0.07);
    border-radius: var(--radius-lg); padding: 26px 26px 24px; color: var(--ink); box-shadow: var(--shadow);
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.cat-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: rgba(23, 134, 122, 0.35); }
.cat-card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; color: var(--ink); }
.cat-card p { margin: 0 0 18px; font-size: 15px; color: var(--ink-soft); }
.cat-card .count {
    margin-top: auto; align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--teal); background: rgba(23, 134, 122, 0.1); border-radius: 999px; padding: 4px 11px;
}

/* article lists */
.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li {
    background: var(--card); border: 1px solid rgba(24, 51, 62, 0.07); border-radius: var(--radius);
    margin-bottom: 10px; box-shadow: 0 1px 2px rgba(24, 51, 62, 0.04);
}
.article-list a {
    display: flex; align-items: center; gap: 12px; padding: 15px 20px; color: var(--ink); font-weight: 500;
    border-radius: var(--radius);
}
.article-list a::after {
    content: ""; margin-left: auto; flex-shrink: 0; width: 8px; height: 8px;
    border-top: 2px solid var(--teal-dark); border-right: 2px solid var(--teal-dark); transform: rotate(45deg);
}
.article-list a:hover { text-decoration: none; background: #FAFCFC; }
.article-list .meta { font-size: 13px; color: var(--ink-mute); font-weight: 400; }

/* breadcrumbs */
.crumbs { font-size: 14px; color: var(--ink-mute); margin: 28px 0 8px; }
.crumbs a { color: var(--ink-mute); }
.crumbs a:hover { color: var(--teal); }

/* article page */
.article-body {
    background: var(--card); border: 1px solid rgba(24, 51, 62, 0.07); border-radius: var(--radius-lg);
    padding: 32px 40px; box-shadow: var(--shadow); color: #2E434E; font-size: 16.5px;
}
.article-body > :first-child { margin-top: 0; }
.article-body h2 { font-size: 22px; margin-top: 30px; color: var(--ink); }
.article-body h3 { font-size: 18px; color: var(--ink); }
.article-body h4 { font-size: 16px; color: var(--ink); }
.article-body strong { color: var(--ink); }
.article-body li { margin-bottom: 4px; }
.article-body pre { background: var(--ink); color: #DDEFEF; padding: 16px 18px; border-radius: 12px; overflow-x: auto; }
.article-body .video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 20px 0; border-radius: 14px; overflow: hidden; background: var(--ink); }
.article-body .video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.article-body code { background: rgba(23, 134, 122, 0.1); color: var(--ink); border-radius: 5px; padding: 1px 6px; font-size: 0.9em; }
.article-body pre code { background: none; color: inherit; padding: 0; }
.article-title { margin: 4px 0 6px; font-size: 36px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.12; }
.article-meta { color: var(--ink-mute); font-size: 15px; margin: 0 0 22px; }

/* search results */
.result {
    background: var(--card); border: 1px solid rgba(24, 51, 62, 0.07); border-radius: var(--radius);
    padding: 18px 22px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(24, 51, 62, 0.04);
}
.result h3 { margin: 0 0 2px; font-size: 18px; }
.result .meta { font-size: 13px; color: var(--ink-mute); margin-bottom: 6px; }
.result p { margin: 0; font-size: 15px; color: var(--ink-soft); }
mark { background: rgba(95, 196, 187, 0.35); color: var(--ink); padding: 0 2px; border-radius: 3px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 22px 0; font-size: 14px; color: var(--ink-mute); }
.site-footer a { color: var(--ink-mute); }
.site-footer a:hover { color: var(--teal); }

/* buttons — the marketing site's pills */
.btn {
    display: inline-block; background: var(--teal-bright); color: var(--ink); border: 1px solid transparent;
    padding: 10px 22px; font-size: 15px; font-family: inherit; border-radius: 999px;
    cursor: pointer; font-weight: 700; letter-spacing: -0.01em; line-height: 1.4;
    transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--mint); text-decoration: none; color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 2px; }
.btn.secondary { background: transparent; color: var(--ink); border-color: rgba(24, 51, 62, 0.22); }
.btn.secondary:hover { background: rgba(23, 134, 122, 0.08); border-color: var(--teal-dark); }
.btn.danger { background: transparent; color: #B3402A; border-color: #E4B8AD; padding: 6px 14px; font-size: 13px; }
.btn.danger:hover { background: #FBEEEA; }

/* ---------- admin ---------- */

.admin-wrap { display: flex; min-height: calc(100vh - 63px); }
.admin-nav {
    width: 220px; flex-shrink: 0; background: #1F3F4B; padding: 24px 0;
}
.admin-nav a { display: block; padding: 10px 24px; color: #BFD3D6; font-size: 15px; }
.admin-nav a:hover { color: #fff; text-decoration: none; }
.admin-nav a.active { color: #fff; background: rgba(255, 255, 255, 0.08); border-left: 3px solid var(--teal-bright); padding-left: 21px; font-weight: 500; }
.admin-main { flex: 1; padding: 30px 34px; min-width: 0; }
.admin-main h1 { margin-top: 0; font-size: 28px; letter-spacing: -0.03em; }

.panel {
    background: var(--card); border: 1px solid rgba(24, 51, 62, 0.07); border-radius: 18px;
    padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(24, 51, 62, 0.04);
}
.panel h2 { margin-top: 0; font-size: 19px; }

.flash { background: #E6F4F2; border: 1px solid #B5DED8; color: var(--teal); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.flash.error { background: #FBEEEA; border-color: #EDC4B8; color: #B3402A; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { color: var(--ink-mute); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.badge.published { background: rgba(23, 134, 122, 0.12); color: var(--teal); }
.badge.draft { background: #FDF1D7; color: #8A6410; }
.badge.revoked { background: #FBEEEA; color: #B3402A; }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.form-row input[type="text"], .form-row input[type="password"], .form-row select, .form-row textarea { width: 100%; }
.form-hint { font-size: 13px; color: var(--ink-mute); margin-top: 5px; }
textarea.body-editor { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.55; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
    background: var(--card); border: 1px solid rgba(24, 51, 62, 0.07); border-radius: 18px;
    padding: 18px 22px; box-shadow: 0 1px 2px rgba(24, 51, 62, 0.04);
}
.stat .num { font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; }
.stat .label { font-size: 13px; color: var(--ink-mute); }

.token-reveal {
    background: var(--ink); color: #DDEFEF; padding: 14px 16px; border-radius: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px;
    word-break: break-all; margin: 10px 0;
}

.login-card { max-width: 420px; margin: 64px auto; }

@media (max-width: 720px) {
    .header-inner { gap: 14px; }
    .brand { gap: 10px; }
    .brand img { height: 22px; }
    .brand span { font-size: 13px; padding-left: 10px; }
    .header-pill { padding: 6px 13px; font-size: 13px; }
    .header-pill .wide-only { display: none; }
    .hero { padding: 48px 0 56px; }
    .hero h1 { font-size: 34px; }
    .hero p { font-size: 16px; }
    .article-title { font-size: 28px; }
    .admin-wrap { flex-direction: column; }
    .admin-nav { width: 100%; display: flex; flex-wrap: wrap; padding: 8px; }
    .admin-nav a { padding: 8px 14px; }
    .admin-nav a.active { border-left: none; padding-left: 14px; }
    .admin-main { padding: 22px 18px; }
    .header-search { display: none; }
    .article-body { padding: 22px; }
}

@media (max-width: 370px) {
    .brand span { display: none; }
}
