/* K-Accounts
   Shared page styles. Everything is scoped under .ka so it sits on top of
   Site.Master + Bootstrap 3 without changing the header/footer. */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

.ka {
    --ink: #18202b;
    --muted: #5d6775;
    --faint: #8a93a0;
    --line: #e1e5ea;
    --line-strong: #c9d0d8;
    --soft: #f5f7f9;
    --surface: #fff;
    /* original K-Accounts colours (Bootstrap primary blue) */
    --accent: #337ab7;
    --accent-hover: #286090;
    --accent-ink: #fff;      /* text on accent background */
    --accent-text: #23629b;  /* accent used as text on white */
    --accent-soft: #eaf2f9;
    --ok: #2e7d32;
    --danger: #b3261e;
    --danger-soft: #fcefee;
    --radius: 8px;

    max-width: 1040px;
    margin: 28px auto 56px;
    font-family: "IBM Plex Sans Thai", "Segoe UI", Tahoma, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

/* staff pages keep the original orange with black text */
.ka--staff,
.ka .ka--staff {
    --accent: #f0ad4e;
    --accent-hover: #ec971f;
    --accent-ink: #000;
    --accent-text: #a8620a;
    --accent-soft: #fdf3e4;
}

.ka--narrow { max-width: 640px; }

.ka h1, .ka h2, .ka h3, .ka h4 {
    font-family: inherit;
    color: inherit;
    margin: 0;
}

.ka p { margin: 0 0 12px; }
.ka a { color: var(--accent-text); }
.ka label { font-weight: 500; }


/* ---------- page header ---------- */

.ka-head {
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.ka-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--accent-text);
}

.ka-eyebrow::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 2px;
    background: var(--accent);
    vertical-align: 1px;
}

.ka-head h1,
.ka-head h2,
.ka-head h3 {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
}

.ka-head p {
    margin: 6px 0 0;
    max-width: 64ch;
    color: var(--muted);
}

/* filled header in the page colour, as on the original pages */
.ka-head--banner {
    padding: 26px 28px;
    border: 0;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-ink);
}

/* English line under / beside Thai text */
.ka-tr {
    display: block;
    margin-top: 2px;
    font-size: .92em;
    font-weight: 400;
    color: var(--faint);
}

.ka-head p .ka-tr { color: var(--muted); }
.ka-head--banner p .ka-tr { color: inherit; }

/* Thai line under an English page title */
.ka-head h1 .ka-tr {
    margin-top: 2px;
    font-size: 16px;
    font-weight: 500;
    color: var(--muted);
}

.ka-head--banner h1 .ka-tr { color: inherit; opacity: .85; }
.ka-message__body h3 .ka-tr { font-size: 15px; color: var(--muted); }

.ka-card__en {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

.ka-head--banner .ka-eyebrow { color: inherit; opacity: .85; }
.ka-head--banner .ka-eyebrow::before { background: currentColor; }
.ka-head--banner p { max-width: none; color: inherit; opacity: .85; }


/* ---------- layout ---------- */

.ka-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 24px;
    align-items: start;
}

.ka-grid > .ka-card { margin-bottom: 0; }

.ka-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}


/* ---------- cards ---------- */

.ka-card {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.ka-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16.5px !important;
    font-weight: 600;
    line-height: 1.4;
}

.ka-card__sub {
    margin: 4px 0 20px !important;
    font-size: 13.5px;
    color: var(--muted);
}

.ka-step {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 13px;
    font-weight: 600;
}


/* ---------- form fields ---------- */

.ka-field { margin-bottom: 16px; }

.ka-field > label,
.ka-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink);
}

.ka-section-label {
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.ka-hint {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--faint);
}

.ka .form-control {
    height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    box-shadow: none;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}

.ka .form-control::placeholder { color: #a3abb5; }

.ka .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    outline: 0;
}

.ka .form-control[readonly] {
    border-color: var(--line);
    background: var(--soft);
    color: var(--muted);
    cursor: default;
}

.ka .form-control[readonly]:focus {
    border-color: var(--line);
    box-shadow: none;
}

.ka textarea.form-control {
    height: auto;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
    word-break: break-all;
    resize: vertical;
}

.ka-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.ka-toggle:hover { color: var(--ink); }

.ka-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ka-choice label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    font-weight: 400;
    cursor: pointer;
}

.ka-choice input { margin: 0; accent-color: var(--accent); }

.ka-choice label:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}


/* ---------- buttons & links ---------- */

.ka-btn {
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}

.ka-btn:hover,
.ka-btn:focus { text-decoration: none; }

.ka-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.ka-btn--primary { background: var(--accent); color: var(--accent-ink); }
.ka-btn--primary:hover,
.ka-btn--primary:focus { background: var(--accent-hover); color: var(--accent-ink); }

.ka-btn--ghost {
    border-color: var(--line-strong);
    background: #fff;
    color: var(--ink);
}

.ka-btn--ghost:hover { background: var(--soft); color: var(--ink); }

.ka-btn--block { width: 100%; }

.ka-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.ka-link {
    font-size: 14.5px;
    color: var(--muted) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ka-link:hover { color: var(--ink) !important; }


/* ---------- notices ---------- */

.ka-notice {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: var(--muted);
}

.ka-notice .fa { margin-top: 4px; color: var(--accent-text); }
.ka-notice p:last-child { margin-bottom: 0; }
.ka-notice strong { color: var(--ink); font-weight: 600; }

.ka .ka-error {
    display: block;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    background: var(--danger-soft);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--danger);
}


/* ---------- password rules (ticked live by the page script) ---------- */

.ka-rules {
    margin-top: 4px;
    padding: 16px 18px;
    border-radius: 6px;
    background: var(--soft);
}

.ka-rules h4 {
    margin-bottom: 10px;
    font-size: 13.5px;
    font-weight: 600;
}

.ka-rules ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ka-rules li {
    position: relative;
    padding-left: 24px;
    font-size: 14px;
    color: var(--muted);
}

.ka-rules li small {
    margin-left: 4px;
    font-size: 12.5px;
    color: var(--faint);
}

.ka-rules li::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 1px;
    width: 13px;
    height: 13px;
    border: 1.5px solid var(--line-strong);
    border-radius: 50%;
    background: #fff center / 9px no-repeat;
    transition: background-color .15s, border-color .15s;
}

.ka-rules li.complete { color: var(--ok); }
.ka-rules li.complete small { color: var(--ok); opacity: .75; }

.ka-rules li.complete::before {
    border-color: var(--ok);
    background-color: var(--ok);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.ka-rules__warn {
    margin: 12px 0 0 !important;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 13.5px;
    color: var(--danger);
}


/* ---------- password generator helper ---------- */

.ka-helper-title {
    display: block;
    margin: 24px 0 10px;
    padding-top: 20px;
    border-top: 1px dashed var(--line-strong);
    font-size: 13.5px;
    font-weight: 600;
}

.ka-gen-output {
    display: block;
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--soft);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 15px;
    letter-spacing: .02em;
    user-select: all;
}

.ka-gen-output:empty { display: none; }

.ka-gen-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* show the external generator link only when Generate Password is shown */
.ka-gen-actions:not(:has(input)) { display: none; }

.ka-gen-actions .fa { font-size: 12px; color: var(--faint); }
.ka a.ka-btn--ghost { color: var(--ink); }

.ka-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

/* compact helper buttons so both fit on one line */
.ka-gen-actions { gap: 8px; }

.ka-gen-actions .ka-btn {
    min-height: 36px;
    padding: 0 12px;
    gap: 6px;
    font-size: 14px;
    white-space: nowrap;
}

.ka-gen-actions .ka-badge {
    padding: 2px 6px;
    font-size: 11px;
}

.ka-gen-note {
    display: block;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--muted);
}


/* ---------- single-message pages ---------- */

.ka-message {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 18px;
    padding: 28px;
}

.ka-message__icon {
    grid-row: span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 20px;
}

.ka-message__body h2 {
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--muted);
}

.ka-message__body h3 {
    margin-bottom: 8px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.45;
}

.ka-message__body p { color: var(--muted); }
.ka-message .ka-actions { margin-top: 12px; }


/* ---------- home ---------- */

.ka-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.ka-group__title {
    margin-bottom: 12px !important;
    font-size: 13px !important;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--muted) !important;
}

.ka-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    background: #fff;
    color: var(--ink) !important;
    text-decoration: none !important;
    transition: border-color .15s, background-color .15s;
}

.ka-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.ka-tile strong { display: block; font-size: 15.5px; font-weight: 600; }
.ka-tile span { display: block; font-size: 13.5px; color: var(--muted); }
.ka-tile .fa { flex: none; color: var(--faint); transition: transform .15s, color .15s; }
.ka-tile:hover .fa { color: var(--accent-text); transform: translateX(2px); }

.ka-foot {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 13.5px;
    color: var(--muted);
}


/* ---------- announcement ---------- */

.ka-en {
    color: var(--muted);
    font-size: 14px;
}

.ka-keydate {
    display: inline-block;
    margin: 4px 0 16px;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--accent-soft);
    font-size: 14px;
    color: var(--accent-text);
}

.ka-split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ka-split .ka-card__sub { margin-bottom: 0 !important; }


/* ---------- standalone pages (no master) ---------- */

.ka-page {
    margin: 0;
    padding: 0 16px;
    background: #f5f7f9;
}


/* ---------- navbar brand (Site.Master) ---------- */

.navbar-brand.ka-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    padding-top: 0;
    padding-bottom: 0;
    font-family: "IBM Plex Sans Thai", "Segoe UI", Tahoma, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #fff !important;
    text-decoration: none;
}

/* logo file is 238x198 — set height only so it keeps its shape */
.navbar-brand.ka-brand img {
    flex: none;
    width: auto;
    height: 40px;
    max-width: none;
}

@media (min-width: 768px) {
    .navbar-brand.ka-brand { margin-right: 20px; }
}

/* navbar menu: grouped by user type, same colours as the pages */
.ka-nav,
.ka-nav .dropdown-menu {
    font-family: "IBM Plex Sans Thai", "Segoe UI", Tahoma, sans-serif;
    font-size: 15px;
}

.ka-nav > li > a::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 2px;
    background: #337ab7;
    vertical-align: 1px;
}

.ka-nav > li.ka-nav--staff > a::before { background: #f0ad4e; }

.ka-nav .dropdown-menu {
    min-width: 200px;
    padding: 6px 0;
    border: 1px solid #e1e5ea;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.ka-nav .dropdown-menu > li > a {
    padding: 8px 16px;
    color: #18202b;
}

.ka-nav .dropdown-menu > li > a:hover,
.ka-nav .dropdown-menu > li > a:focus { background: #eaf2f9; color: #18202b; }

.ka-nav .ka-nav--staff .dropdown-menu > li > a:hover,
.ka-nav .ka-nav--staff .dropdown-menu > li > a:focus { background: #fdf3e4; }

/* collapsed (mobile) menu: items sit on the dark bar */
@media (max-width: 767px) {
    .ka-nav .dropdown-menu { border: 0; box-shadow: none; }
    .navbar-inverse .ka-nav .open .dropdown-menu > li > a { padding-left: 32px; color: #ccc; }
    .navbar-inverse .ka-nav .open .dropdown-menu > li > a:hover { background: transparent; color: #fff; }
}


@media (max-width: 860px) {
    .ka-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .ka { margin: 16px auto 40px; }
    .ka-head h1, .ka-head h2, .ka-head h3 { font-size: 22px; }
    .ka-card { padding: 18px; }
    .ka-row2, .ka-tiles { grid-template-columns: 1fr; }
    .ka-message { grid-template-columns: 1fr; padding: 22px; }
    .ka-message__icon { grid-row: auto; }
}


/* ======================================================================
   User guide (userguide.aspx)
   ====================================================================== */

.ka.kg {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
    max-width: 1100px;
}

/* show one language at a time; with no script both stay visible */
.kg[data-lang="en"] [lang="th"],
.kg[data-lang="th"] [lang="en"] { display: none !important; }

/* ---- side contents ---- */

.kg-side {
    position: sticky;
    top: 74px;
    align-self: start;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.kg-nav {
    padding: 4px 0 16px;
    border-right: 1px solid var(--line);
}

.kg-nav__brand {
    padding: 0 16px 14px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-text);
}

.kg-nav__brand > span {
    display: block;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--muted);
}

.kg-nav__group {
    padding: 12px 16px 4px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--faint);
}

.ka .kg-nav__link {
    display: block;
    padding: 6px 16px 6px 13px;
    border-left: 3px solid transparent;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink);
    text-decoration: none;
    transition: background-color .12s, color .12s;
}

.ka .kg-nav__link:hover,
.ka .kg-nav__link.is-active {
    border-left-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-text);
}

/* ---- main column ---- */

.kg-main { min-width: 0; max-width: 780px; }

.kg-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    padding: 32px 32px 28px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--accent-ink);
}

.kg-hero::after {
    content: "";
    position: absolute;
    top: -70px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.kg-hero__eyebrow {
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .04em;
    opacity: .85;
}

.ka .kg-hero__title {
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.25;
}

.kg-hero__sub { max-width: 520px; margin: 0 !important; opacity: .9; }

.kg-lang {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 20px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
}

.kg-lang button {
    padding: 5px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: 13.5px;
    color: inherit;
    cursor: pointer;
}

.kg-lang button[aria-pressed="true"] {
    background: #fff;
    color: var(--accent-hover);
    font-weight: 600;
}

/* ---- sections ---- */

.kg-section {
    margin-bottom: 52px;
    scroll-margin-top: 74px;
}

.kg-section__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--line);
}

.kg-num {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 14px;
    font-weight: 600;
}

.ka .kg-section__title { font-size: 21px; font-weight: 600; line-height: 1.35; }

.kg-section__desc {
    margin: 2px 0 0 !important;
    font-size: 14px;
    color: var(--muted);
}

.kg-tag {
    display: inline-block;
    margin-bottom: 4px;
    padding: 1px 8px;
    border-radius: 4px;
    background: var(--accent-soft);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-text);
}

.ka .kg-subhead { margin: 28px 0 12px; font-size: 16px; font-weight: 600; }

/* steps */

.kg-steps {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kg-step { display: flex; align-items: flex-start; gap: 14px; }

.kg-step__n {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-top: 1px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent-text);
}

.kg-step__title { font-size: 15px; font-weight: 600; }

.kg-step__text {
    margin: 2px 0 0 !important;
    font-size: 14px;
    line-height: 1.65;
    color: var(--muted);
}

.kg-step__text b, .kg-list b, .kg-section__desc b { color: var(--ink); font-weight: 600; }

/* tip */

.kg-tip {
    margin: 20px 0 0;
    padding: 12px 16px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent-soft);
    font-size: 14px;
    line-height: 1.6;
}

.kg-tip strong { color: var(--accent-text); font-weight: 600; }

.kg-note { margin: 12px 0 0 !important; font-size: 13.5px; color: var(--muted); }

/* overview table + list */

.kg-table-wrap { overflow-x: auto; }

.kg-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}

.kg-table th,
.kg-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    text-align: left;
}

.kg-table tr:last-child td { border-bottom: 0; }
.kg-table th { background: var(--soft); font-size: 13px; font-weight: 600; }
.kg-table td a { font-weight: 500; }

.kg-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 2px;
    background: var(--accent);
}

.kg-list { margin: 16px 0 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
.kg-list li { margin-bottom: 6px; }

/* rules */

.kg-checks {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 16px 18px;
    border-radius: 8px;
    background: var(--soft);
    list-style: none;
    font-size: 14px;
}

.kg-checks li { position: relative; padding-left: 26px; }

.kg-checks li::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.kg-checks li.kg-checks__no { color: var(--danger); }

.kg-checks li.kg-checks__no::before {
    background: var(--danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.5 3.5l5 5M8.5 3.5l-5 5' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* cards */

.kg-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.kg-card {
    display: block;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.ka a.kg-card--link { color: var(--ink); text-decoration: none; transition: border-color .15s; }
.ka a.kg-card--link:hover { border-color: var(--accent); }

.kg-card__icon { margin-bottom: 8px; font-size: 18px; color: var(--accent-text); }
.kg-card__name { margin-bottom: 4px; font-size: 15px; font-weight: 600; }
.kg-card__name .ka-badge { margin-left: 4px; font-size: 11px; vertical-align: 1px; }
.kg-card__text { margin: 0 !important; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.kg-card__text a { display: inline-block; margin-top: 6px; font-size: 13px; }

/* faq */

.kg-faq {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.kg-faq details + details { border-top: 1px solid var(--line); }

.kg-faq summary {
    position: relative;
    padding: 12px 40px 12px 16px;
    font-size: 14.5px;
    font-weight: 500;
    list-style: none;
    cursor: pointer;
}

.kg-faq summary::-webkit-details-marker { display: none; }

.kg-faq summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--faint);
}

.kg-faq details[open] summary::after { content: "–"; }
.kg-faq summary:hover { background: var(--soft); }

.kg-faq details p {
    margin: 0 !important;
    padding: 0 16px 14px;
    font-size: 14px;
    color: var(--muted);
}

@media (max-width: 860px) {
    .ka.kg { grid-template-columns: 1fr; gap: 0; }
    .kg-side { display: none; }
}

@media (max-width: 600px) {
    .kg-hero { padding: 24px 20px 22px; }
    .ka .kg-hero__title { font-size: 23px; }
    .kg-cards { grid-template-columns: 1fr; }
}

/* plain navbar links (User Guide) carry no group colour */
.ka-nav > li:not(.dropdown) > a::before { display: none; }

/* ---------- navbar: User Guide link + "new" tip (Site.Master) ---------- */

.ka-nav .ka-nav-guide { display: inline-flex; align-items: center; gap: 6px; }
.ka-nav-guide__icon { flex: none; }

.ka-guide-tip {
    position: fixed;
    z-index: 1040;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    max-width: min(360px, calc(100vw - 16px));
    padding: 10px 12px 10px 14px;
    border-radius: 8px;
    background: #337ab7;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
    font-family: "IBM Plex Sans Thai", "Segoe UI", Tahoma, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: #fff;
}

.ka-guide-tip[hidden] { display: none; }

.ka-guide-tip__text { flex: 1 1 200px; }
.ka-guide-tip strong { font-weight: 600; }

.ka-guide-tip__arrow {
    position: absolute;
    top: -6px;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    background: #337ab7;
    transform: rotate(45deg);
}

.ka-guide-tip__ok {
    flex: none;
    padding: 4px 12px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #286090;
    cursor: pointer;
}

.ka-guide-tip__ok:hover { background: #eaf2f9; }
.ka-guide-tip__ok:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
