/* KodMail · CodeCanyon documentation
   ---------------------------------------------------------------
   Clean reading-first stylesheet. Mirrors the app's coral / slate
   theme tokens so the docs look like a natural extension of the
   product. No JS framework — pure HTML + CSS.
*/

:root {
    --bg: #fffaf6;
    --bg-elev: #ffffff;
    --border: #f0e4d8;
    --border-strong: #e6d4be;
    --muted: #f7eee3;
    --text: #1c1a18;
    --text-soft: #6b6052;
    --text-fade: #968976;
    --accent: #ea6649;
    --accent-soft: #fde4dc;
    --accent-foreground: #ffffff;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --code-bg: #1d1b18;
    --code-text: #f4e9d8;

    --shadow-sm: 0 1px 2px rgba(28, 26, 24, 0.04);
    --shadow-md: 0 4px 14px rgba(28, 26, 24, 0.06);
    --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* Page layout */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

aside.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-elev);
    border-right: 1px solid var(--border);
    padding: 24px 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 28px;
}
.brand-logo {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), #d04a30);
    color: #fff;
    box-shadow: 0 4px 10px rgba(234, 102, 73, 0.3);
}
.brand-name { font-size: 16px; letter-spacing: -0.01em; }
.brand-version { display: block; font-size: 11px; font-weight: 500; color: var(--text-fade); }

.nav-group {
    margin-top: 20px;
}
.nav-group h4 {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--text-fade);
    margin: 0 0 8px 8px;
}
nav ul { list-style: none; padding: 0; margin: 0; }
nav li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 13.5px;
    transition: background .15s, color .15s;
}
nav li a:hover { background: var(--muted); color: var(--text); }
nav li a.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

main {
    padding: 48px 56px 80px;
    max-width: 920px;
}
main.wide { max-width: 1080px; }

/* Headings */
h1, h2, h3, h4 { color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: 34px; margin: 0 0 10px; }
h2 { font-size: 24px; margin: 48px 0 14px; padding-top: 8px; }
h3 { font-size: 18px; margin: 32px 0 10px; }
h4 { font-size: 14.5px; margin: 20px 0 6px; }

.lede {
    font-size: 17px;
    color: var(--text-soft);
    max-width: 65ch;
    margin: 0 0 32px;
    line-height: 1.6;
}

/* Text */
p { margin: 12px 0; max-width: 70ch; }
ul, ol { padding-left: 22px; max-width: 70ch; }
li { margin: 6px 0; }

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s; }
a:hover { border-bottom-color: var(--accent); }

strong { font-weight: 600; }
em { font-style: italic; }
hr { border: none; border-top: 1px solid var(--border); margin: 36px 0; }

/* Inline code + code blocks */
code {
    font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, monospace;
    font-size: 13px;
    background: var(--muted);
    color: var(--text);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 18px 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    margin: 16px 0;
    box-shadow: var(--shadow-md);
}
pre code {
    background: transparent;
    color: inherit;
    border: 0;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* Cards + callouts */
.card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin: 18px 0;
    box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }

.callout {
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    padding: 14px 18px;
    border-radius: 8px;
    margin: 18px 0;
    color: var(--text);
}
.callout.info { border-color: #2563eb; background: #e8efff; }
.callout.warn { border-color: var(--warning); background: #fff4e3; }
.callout.danger { border-color: var(--danger); background: #fde4e4; }
.callout strong { display: block; margin-bottom: 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
th, td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th { background: var(--muted); color: var(--text); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(234, 102, 73, 0.03); }
td code { font-size: 12.5px; }

/* Feature pill grid */
.pill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 20px 0;
}
.pill {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 14px 16px;
}
.pill .pill-title { font-weight: 600; font-size: 13.5px; color: var(--text); display: block; margin-bottom: 4px; }
.pill .pill-desc { font-size: 12.5px; color: var(--text-soft); margin: 0; }

/* Screenshot frame */
.screenshot {
    margin: 22px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--bg-elev);
}
.screenshot img { display: block; width: 100%; height: auto; }
.screenshot-placeholder {
    aspect-ratio: 16/9;
    background:
        repeating-linear-gradient(45deg, var(--muted) 0 12px, var(--bg-elev) 12px 24px);
    display: grid;
    place-items: center;
    color: var(--text-fade);
    font-size: 13px;
    text-align: center;
    padding: 32px;
}
.screenshot-placeholder code {
    margin-top: 8px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.7);
}
.screenshot-caption {
    padding: 10px 14px;
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-soft);
}

/* Step list */
ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps > li {
    counter-increment: step;
    position: relative;
    padding-left: 44px;
    margin: 18px 0;
    min-height: 30px;
}
ol.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
}

/* Pager between pages */
.pager {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 60px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}
.pager a {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elev);
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, transform .15s;
    border-bottom: 1px solid var(--border);
}
.pager a:hover { border-color: var(--accent); transform: translateY(-1px); }
.pager .label { display: block; font-size: 11px; color: var(--text-fade); text-transform: uppercase; letter-spacing: 0.08em; }
.pager .title { font-weight: 600; }
.pager .next { text-align: right; }

/* Badge */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent);
    letter-spacing: 0.02em;
    vertical-align: middle;
}
.badge.success { background: #dcf6e6; color: #15803d; }
.badge.warn { background: #fff0d6; color: #b45309; }
.badge.info { background: #e1ecff; color: #1d4ed8; }

/* Compliance + capability table marker. Reads as a green pill before
   the qualifying clause (e.g. "Yes — Blocked at pre-flight"). */
.yes {
    display: inline-block;
    padding: 1px 8px;
    margin-right: 4px;
    border-radius: 99px;
    background: #dcf6e6;
    color: #15803d;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Mobile */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    aside.sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
    main { padding: 24px 20px 64px; }
    h1 { font-size: 28px; }
    h2 { font-size: 21px; }
}
