/* ============================================================
   KetikCepat - Public stylesheet
   ============================================================ */

:root {
    --accent: #6366f1;
    --accent-strong: #4f46e5;
    --accent-soft: rgba(99, 102, 241, 0.12);
    --accent-secondary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);

    --bg: #f6f7fb;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-2: #f1f2f9;
    --surface-3: #e9ebf4;
    --text: #14162b;
    --text-soft: #3b4058;
    --text-muted: #6b7285;
    --text-faint: #9298ab;
    --border: #e3e5ef;
    --border-strong: #d2d5e3;
    --typing-pending: #9aa0b4;
    --typing-wrong: #e11d48;

    --shadow-sm: 0 1px 2px rgba(20, 22, 43, 0.05);
    --shadow-md: 0 12px 30px rgba(20, 22, 43, 0.08);
    --shadow-lg: 0 30px 70px rgba(20, 22, 43, 0.12);
    --shadow-accent: 0 18px 40px rgba(99, 102, 241, 0.28);

    --chart-grid: rgba(100, 116, 139, 0.22);

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", "DejaVu Sans Mono", Consolas, monospace;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --container: 1180px;
    --header-height: 72px;
}

[data-theme="dark"] {
    --bg: #090b14;
    --bg-elevated: #0f1220;
    --surface: #121527;
    --surface-2: #181c31;
    --surface-3: #1f2440;
    --text: #eef0fa;
    --text-soft: #c8cbe0;
    --text-muted: #98a0bb;
    --text-faint: #6f7793;
    --border: #232841;
    --border-strong: #2f3557;
    --typing-pending: #6a7391;
    --typing-wrong: #fb7185;
    --accent: #818cf8;
    --accent-strong: #6366f1;
    --accent-soft: rgba(129, 140, 248, 0.16);
    --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 34px 80px rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --chart-grid: rgba(148, 163, 184, 0.18);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
}

p {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: rgba(99, 102, 241, 0.25);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: 860px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--accent-strong);
    color: #fff;
    font-weight: 600;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 12px;
}

/* ------------------------------------------------------------
   Buttons, chips, small elements
   ------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 48px rgba(99, 102, 241, 0.36);
}

.btn-ghost {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 9px 16px;
    font-size: 0.875rem;
    border-radius: 10px;
}

.btn-block {
    width: 100%;
}

.icon-button {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    flex: none;
}

.icon-button:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--surface-2);
}

.icon-button.is-active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.text-button,
.link-button {
    background: none;
    border: 0;
    padding: 0;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
}

.text-button:hover,
.link-button:hover {
    text-decoration: underline;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.chip.is-active {
    background: var(--accent-soft);
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--accent-strong);
}

.chip--accent {
    background: var(--accent-soft);
    border-color: transparent;
    color: var(--accent-strong);
}

.chip--lg {
    padding: 9px 18px;
    font-size: 0.9rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.eyebrow--live {
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 999px;
    letter-spacing: 0.05em;
    text-transform: none;
    font-size: 0.8rem;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
    animation: pulse 2.4s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--accent-strong);
    white-space: nowrap;
}

.link-arrow:hover {
    gap: 10px;
}

.link-arrow svg {
    transition: transform 0.15s ease;
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    height: var(--header-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.32);
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 1.02rem;
    letter-spacing: -0.01em;
}

.brand-text small {
    font-size: 0.68rem;
    color: var(--text-faint);
    letter-spacing: 0.02em;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
    flex: 1;
}

.primary-nav a {
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.15s ease, background 0.15s ease;
}

.primary-nav a:hover {
    color: var(--text);
    background: var(--surface-2);
}

.primary-nav a.is-active {
    color: var(--text);
    background: var(--surface-2);
    font-weight: 600;
}

.nav-search-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
    position: relative;
    padding: 66px 0 84px;
    overflow: clip;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -30% -10% auto;
    height: 680px;
    background:
        radial-gradient(46% 60% at 18% 24%, rgba(99, 102, 241, 0.16), transparent 70%),
        radial-gradient(40% 55% at 82% 10%, rgba(168, 85, 247, 0.14), transparent 72%);
    pointer-events: none;
    z-index: -1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    gap: 56px;
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(2.4rem, 4.2vw, 3.65rem);
    letter-spacing: -0.035em;
    margin: 0 0 20px;
}

.accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    font-size: 1.075rem;
    color: var(--text-muted);
    max-width: 520px;
    margin-bottom: 26px;
}

.hero-points {
    display: grid;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.94rem;
    color: var(--text-soft);
}

.hero-points svg {
    flex: none;
    margin-top: 3px;
    color: var(--accent);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 34px;
}

.hero-metrics {
    display: flex;
    gap: 34px;
    margin: 0;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    max-width: 430px;
}

.hero-metrics dt {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.hero-metrics dd {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: var(--text-faint);
}

.hero-widget {
    position: relative;
}

.hero-widget-glow {
    position: absolute;
    inset: 8% 2% -6%;
    background: var(--accent-gradient);
    filter: blur(52px);
    opacity: 0.2;
    border-radius: var(--radius-xl);
    z-index: -1;
}

/* ------------------------------------------------------------
   Typing widget
   ------------------------------------------------------------ */

.typing-widget {
    --type-font: 1.32rem;
    --type-lh: 1.9;
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-lg);
}

.typing-widget--compact {
    --type-font: 1.08rem;
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.typing-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.segmented {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.segmented-item {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 7px;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.typing-widget--full .segmented-item {
    font-size: 0.82rem;
    padding: 7px 12px;
}

.segmented-item:hover {
    color: var(--text);
}

.segmented-item.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.typing-tools {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.typing-tools .icon-button {
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

.typing-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 12px 4px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.typing-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.typing-stat-value {
    font-family: var(--font-mono);
    font-size: 1.42rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.typing-widget--compact .typing-stat-value {
    font-size: 1.14rem;
}

.typing-stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    font-weight: 600;
}

.typing-stat--rank .typing-stat-value {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    color: var(--accent-strong);
}

.typing-widget--compact .typing-stat--rank .typing-stat-value {
    font-size: 0.86rem;
}

.typing-stage {
    position: relative;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 20px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.typing-widget--compact .typing-stage {
    padding: 16px 16px 14px;
}

.typing-stage.is-focused {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.typing-viewport {
    position: relative;
    height: calc(var(--type-font) * var(--type-lh) * 3);
    overflow: hidden;
}

.typing-text {
    position: relative;
    font-family: var(--font-mono);
    font-size: var(--type-font);
    line-height: var(--type-lh);
    letter-spacing: 0.005em;
    white-space: pre-wrap;
    overflow-wrap: normal;
    color: var(--typing-pending);
    transition: transform 0.16s ease;
    will-change: transform;
}

.char {
    color: var(--typing-pending);
    transition: color 0.06s linear;
}

.char.is-correct {
    color: var(--text);
}

.char.is-incorrect {
    color: var(--typing-wrong);
    background: rgba(225, 29, 72, 0.13);
    border-radius: 3px;
    text-decoration: underline;
    text-decoration-style: wavy;
    text-decoration-thickness: 1px;
}

.typing-cursor {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: calc(var(--type-font) * 1.35);
    border-radius: 2px;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.55);
    transition: transform 0.07s ease-out, opacity 0.2s ease;
    animation: caret-blink 1.05s step-end infinite;
    will-change: transform;
    z-index: 2;
}

.typing-stage.is-started .typing-cursor {
    animation-duration: 0.85s;
}

@keyframes caret-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.15; }
}

.typing-input {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    resize: none;
    overflow: hidden;
    pointer-events: none;
}

.typing-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: var(--radius);
    background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--surface-2) 74%, transparent) 0%, transparent 68%);
    z-index: 3;
    text-align: center;
    padding: 16px;
}

.typing-overlay .btn {
    box-shadow: 0 16px 32px rgba(99, 102, 241, 0.3);
}

.typing-overlay p {
    font-size: 0.74rem;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.typing-widget--compact .typing-overlay {
    background: color-mix(in srgb, var(--surface-2) 90%, transparent);
}

.typing-widget--compact .typing-overlay .btn {
    padding: 9px 18px;
    font-size: 0.86rem;
}

.typing-footnote {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.72rem;
    color: var(--text-faint);
}

.typing-widget--compact .typing-footnote {
    font-size: 0.68rem;
}

.typing-result {
    margin-top: 16px;
}

.result-card {
    background:
        linear-gradient(180deg, var(--accent-soft), transparent 65%),
        var(--surface-2);
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-radius: var(--radius);
    padding: 20px;
    animation: result-in 0.28s ease both;
}

@keyframes result-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent-strong);
    font-weight: 700;
}

.result-wpm {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 2px 0 2px;
}

.result-wpm strong {
    font-family: var(--font-mono);
    font-size: 2.9rem;
    line-height: 1;
    letter-spacing: -0.05em;
}

.result-wpm span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.result-rank {
    display: inline-flex;
    margin-top: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.result-grid div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.result-grid strong {
    font-size: 0.98rem;
}

.result-grid span {
    font-size: 0.7rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.result-actions {
    display: flex;
    gap: 8px;
}

.typing-widget--compact .result-wpm strong {
    font-size: 2.3rem;
}

/* ------------------------------------------------------------
   Sections and cards
   ------------------------------------------------------------ */

.section {
    padding: 78px 0;
}

.section--soft {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.section-head h2 {
    font-size: clamp(1.6rem, 2.4vw, 2.15rem);
    letter-spacing: -0.03em;
}

.section-head .eyebrow {
    margin-bottom: 8px;
}

.section-head--center {
    justify-content: center;
    text-align: center;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 24px;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.article-card-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-2);
}

.article-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-card-media img {
    transform: scale(1.04);
}

.article-card-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 2.4rem;
    font-weight: 800;
}

.article-card-body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
}

.article-card-title {
    font-size: 1.04rem;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.article-card-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-title a:hover {
    color: var(--accent-strong);
}

.article-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.74rem;
    color: var(--text-faint);
    padding-top: 6px;
}

.article-card-body > .chip {
    align-self: flex-start;
}

.dot {
    opacity: 0.6;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.step-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 24px;
    overflow: hidden;
}

.step-number {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-strong);
    background: var(--accent-soft);
    border-radius: 7px;
    padding: 3px 8px;
    margin-bottom: 14px;
}

.step-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.categories-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.empty-state {
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 44px 28px;
    text-align: center;
}

.empty-state h2,
.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.empty-state a {
    color: var(--accent-strong);
    font-weight: 600;
}

/* ------------------------------------------------------------
   List / article pages
   ------------------------------------------------------------ */

.list-page,
.test-page {
    padding: 56px 0 88px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.page-head h1 {
    font-size: clamp(1.9rem, 3.2vw, 2.75rem);
    letter-spacing: -0.035em;
    margin-bottom: 10px;
}

.page-head-lead {
    color: var(--text-muted);
    max-width: 640px;
    font-size: 1rem;
}

.page-head--compact {
    margin-bottom: 22px;
}

.page-head--stacked {
    display: block;
    margin-bottom: 34px;
}

.page-head-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-faint);
    padding-bottom: 6px;
}

.kbd {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 6px;
    padding: 2px 6px;
    background: var(--surface);
    color: var(--text-soft);
    margin-left: 8px;
}

.search-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-inline input {
    width: 240px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.9rem;
}

.search-inline input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-big {
    display: flex;
    gap: 10px;
    margin-bottom: 32px;
    max-width: 620px;
}

.search-big input {
    flex: 1;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.98rem;
}

.search-big input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.filter-count {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-faint);
}

.article-grid--list {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 44px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.page-link:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.page-link.is-current {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
}

.page-link.is-disabled {
    opacity: 0.45;
}

.page-ellipsis {
    color: var(--text-faint);
    padding: 0 4px;
}

/* ------------------------------------------------------------
   Article detail
   ------------------------------------------------------------ */

.article-detail {
    padding: 34px 0 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-faint);
    margin-bottom: 26px;
}

.breadcrumb a:hover {
    color: var(--accent-strong);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 52px;
    align-items: start;
}

.article-header h1 {
    font-size: clamp(1.9rem, 3.6vw, 2.85rem);
    letter-spacing: -0.035em;
    margin: 12px 0 14px;
}

.article-deck {
    font-size: 1.06rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 720px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 700;
    flex: none;
}

.article-meta-text {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.article-meta-text strong {
    font-size: 0.9rem;
}

.article-meta-text span {
    font-size: 0.78rem;
    color: var(--text-faint);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.article-featured {
    margin: 0 0 34px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.article-featured img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.prose {
    font-size: 1.025rem;
    line-height: 1.85;
    color: var(--text-soft);
    max-width: 720px;
}

.prose > * + * {
    margin-top: 1.1em;
}

.prose h2 {
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    margin-top: 1.9em;
    color: var(--text);
}

.prose h3 {
    font-size: 1.2rem;
    margin-top: 1.6em;
    color: var(--text);
}

.prose a {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose ul,
.prose ol {
    padding-left: 1.35em;
}

.prose ul {
    list-style: disc;
}

.prose ol {
    list-style: decimal;
}

.prose li {
    margin-top: 0.45em;
}

.prose li::marker {
    color: var(--accent);
}

.prose blockquote {
    margin: 1.7em 0;
    padding: 18px 22px;
    border-left: 3px solid var(--accent);
    background: var(--surface-2);
    border-radius: 0 12px 12px 0;
    font-size: 1.03rem;
    color: var(--text);
    font-style: italic;
}

.prose img {
    border-radius: var(--radius);
    margin: 1.4em 0;
    border: 1px solid var(--border);
}

.prose figure {
    margin: 1.6em 0;
}

.prose figcaption {
    font-size: 0.78rem;
    color: var(--text-faint);
    text-align: center;
    margin-top: 8px;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.prose th,
.prose td {
    border: 1px solid var(--border);
    padding: 9px 12px;
    text-align: left;
}

.prose th {
    background: var(--surface-2);
}

.prose code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 5px;
}

.prose pre {
    background: #10142a;
    color: #e2e8f0;
    padding: 18px;
    border-radius: 12px;
    overflow: auto;
    font-size: 0.85rem;
    line-height: 1.6;
}

.prose pre code {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 42px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.article-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.84rem;
    color: var(--text-faint);
}

.article-share a,
.article-share button {
    color: var(--text-soft);
    font-weight: 600;
    font-size: 0.84rem;
}

.article-share a:hover,
.article-share button:hover {
    color: var(--accent-strong);
}

.article-side {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    display: grid;
    gap: 18px;
}

.side-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.side-card h2 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.side-card--cta {
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(168, 85, 247, 0.14), transparent 60%),
        var(--surface);
    border-color: rgba(99, 102, 241, 0.28);
}

.side-card--cta h2 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.side-card--cta p {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.related-list {
    display: grid;
    gap: 14px;
}

.related-list a {
    display: flex;
    gap: 11px;
    align-items: flex-start;
}

.related-list a:hover strong {
    color: var(--accent-strong);
}

.related-thumb {
    flex: none;
    width: 74px;
    height: 56px;
    border-radius: 9px;
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.related-text strong {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-text small {
    font-size: 0.7rem;
    color: var(--text-faint);
}

/* ------------------------------------------------------------
   Typing test page layout
   ------------------------------------------------------------ */

.test-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    align-items: start;
}

.test-main {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.test-side {
    display: grid;
    gap: 18px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.rank-current {
    font-family: var(--font-mono);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.rank-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.rank-sub strong {
    color: var(--text);
}

.rank-scale {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 14px;
}

.rank-segment {
    padding: 6px 9px;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-faint);
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.rank-segment.is-active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
}

.rank-hint {
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-top: 10px;
}

.side-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.side-card-head h2 {
    margin-bottom: 0;
}

.history-list {
    display: grid;
    gap: 2px;
    margin: 12px 0;
}

.history-row {
    display: grid;
    grid-template-columns: 62px 46px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 7px 2px;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
}

.history-row:last-child {
    border-bottom: 0;
}

.history-wpm {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.92rem;
}

.history-wpm small {
    font-size: 0.62rem;
    color: var(--text-faint);
    font-weight: 500;
    margin-left: 3px;
}

.history-acc {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

.history-meta {
    color: var(--text-faint);
    font-size: 0.7rem;
}

.history-rank {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--accent-strong);
    background: var(--accent-soft);
    border-radius: 5px;
    padding: 2px 6px;
    white-space: nowrap;
}

.empty-note {
    font-size: 0.8rem;
    color: var(--text-faint);
}

.history-chart {
    width: 100%;
    height: 140px;
    display: block;
}

.switch-row,
.field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.84rem;
    color: var(--text-soft);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.field-row select {
    padding: 6px 9px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 0.78rem;
}

.switch-row input[type="checkbox"] {
    accent-color: var(--accent);
    width: 17px;
    height: 17px;
}

.side-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.side-actions .btn {
    flex: 1;
}

.file-button {
    position: relative;
    overflow: hidden;
    text-align: center;
}

.file-button input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}

.side-note {
    font-size: 0.7rem;
    color: var(--text-faint);
    margin-top: 10px;
}

.test-notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.note-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.note-card h2 {
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.note-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ------------------------------------------------------------
   Simple pages, footer, toast
   ------------------------------------------------------------ */

.page-simple {
    padding: 60px 0 90px;
}

.prose--page {
    max-width: 100%;
}

.prose--page h2 {
    margin-top: 1.7em;
}

.cta-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 48px;
    padding: 28px 30px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(168, 85, 247, 0.2), transparent 60%),
        var(--surface);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.cta-panel h2 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.cta-panel p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.notfound {
    padding: 90px 0 110px;
    text-align: center;
}

.notfound-code {
    font-family: var(--font-mono);
    font-size: clamp(5rem, 14vw, 9rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.06em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

.notfound h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 12px;
}

.notfound-lead {
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 26px;
}

.notfound-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.notfound-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 28px;
    font-size: 0.85rem;
    color: var(--text-faint);
}

.notfound-links a:hover {
    color: var(--accent-strong);
}

.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 56px 0 26px;
    margin-top: 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 36px;
}

.footer-brand p {
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 340px;
}

.footer-note {
    color: var(--text-faint) !important;
    font-size: 0.78rem !important;
}

.footer-column h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    margin-bottom: 12px;
}

.footer-column ul {
    display: grid;
    gap: 7px;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.footer-column a:hover {
    color: var(--accent-strong);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    font-size: 0.76rem;
    color: var(--text-faint);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 16px);
    background: var(--text);
    color: var(--bg);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 200;
    max-width: calc(100vw - 32px);
    text-align: center;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

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

    .test-side {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .article-layout {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .article-side {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero {
        padding-top: 44px;
    }

    .hero-copy h1 {
        font-size: clamp(2.1rem, 7vw, 3rem);
    }

    .hero-widget {
        max-width: 620px;
    }

    .steps-grid,
    .test-notes {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
        order: 3;
    }

    .primary-nav {
        position: absolute;
        top: var(--header-height);
        left: 12px;
        right: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px;
        border-radius: var(--radius);
        background: var(--surface);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        margin: 0;
    }

    .site-header.is-nav-open .primary-nav {
        display: flex;
    }

    .header-actions {
        margin-left: auto;
    }

    .header-cta {
        display: none;
    }

    .brand-text small {
        display: none;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 18px;
    }

    .section {
        padding: 54px 0;
    }

    .page-head {
        align-items: flex-start;
    }

    .search-inline {
        width: 100%;
    }

    .search-inline input {
        flex: 1;
        width: auto;
    }

    .search-big {
        flex-direction: column;
    }

    .search-big .btn {
        width: 100%;
    }

    .typing-widget {
        --type-font: 1.1rem;
        padding: 16px;
        border-radius: var(--radius);
    }

    .typing-widget--compact {
        --type-font: 0.98rem;
        padding: 14px;
    }

    .typing-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 10px;
    }

    .typing-toolbar {
        gap: 8px;
    }

    .segmented-item {
        font-size: 0.72rem;
        padding: 5px 8px;
    }

    .typing-widget--full .segmented-item {
        font-size: 0.74rem;
        padding: 6px 9px;
    }

    .typing-footnote span:last-child {
        display: none;
    }

    .result-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .categories-strip {
        align-items: flex-start;
    }

    .hero-metrics {
        gap: 24px;
    }

    .cta-panel {
        padding: 22px;
    }

    .history-row {
        grid-template-columns: 56px 42px 1fr;
    }

    .history-rank {
        display: none;
    }
}

@media (max-width: 420px) {
    .typing-stat--rank {
        display: none;
    }

    .typing-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
    }
}

/* ------------------------------------------------------------
   Iklan
   ------------------------------------------------------------ */

.ad-band {
    padding: 6px 0 22px;
}

.ad-slot {
    position: relative;
    display: block;
    margin-bottom: 18px;
}

.ad-slot:last-child {
    margin-bottom: 0;
}

.ad-slot .ad-link {
    display: block;
}

.ad-slot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.ad-label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    pointer-events: none;
}

.ad-slot--home img {
    border-radius: 16px;
}

.ad-slot--sidebar img {
    border-radius: 10px;
}

.ad-slot--article img {
    border-radius: 12px;
}

.ad-inline {
    margin: 32px 0;
}

.article-ad--bottom {
    margin: 34px 0 0;
}

.typing-ad {
    display: grid;
    gap: 10px;
}

.side-card--ad {
    padding: 12px;
}

/* ------------------------------------------------------------
   Sidebar widgets
   ------------------------------------------------------------ */

.widget-card .widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.widget-head h2 {
    margin: 0;
    font-size: 0.95rem;
}

.widget-head a {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-strong);
}

.widget-head a:hover {
    text-decoration: underline;
}

.widget-list {
    display: grid;
    gap: 11px;
}

.widget-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.widget-thumb {
    flex: none;
    width: 64px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.widget-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 700;
}

.widget-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.widget-copy strong {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.widget-copy small {
    font-size: 0.68rem;
    color: var(--text-faint);
}

.widget-item:hover strong {
    color: var(--accent-strong);
}

.widget-ranked {
    display: grid;
    gap: 11px;
}

.widget-ranked--thumb li {
    display: block;
}

.widget-ranked--thumb .widget-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.widget-ranked--thumb .widget-copy {
    flex: 1;
    min-width: 0;
}

.widget-ranked--thumb .widget-thumb {
    position: relative;
    flex: none;
    width: 64px;
    height: 48px;
}

.widget-rank-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(10, 12, 24, 0.78);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.5;
}

.widget-ranked--thumb .widget-copy strong {
    -webkit-line-clamp: 2;
}

.widget-ranked li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.widget-number {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.widget-ranked a {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.widget-ranked strong {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.widget-ranked small {
    font-size: 0.68rem;
    color: var(--text-faint);
}

.widget-ranked a:hover strong {
    color: var(--accent-strong);
}

.widget-categories {
    display: grid;
}

.widget-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    font-size: 0.82rem;
    color: var(--text-soft);
    border-bottom: 1px solid var(--border);
}

.widget-categories li:last-child a {
    border-bottom: 0;
}

.widget-categories a:hover {
    color: var(--accent-strong);
}

.widget-count {
    flex: none;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
}

/* ------------------------------------------------------------
   Daftar artikel ringkas (tes ketik & hasil)
   ------------------------------------------------------------ */

.mini-articles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mini-article {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    height: 100%;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.mini-article:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mini-thumb {
    flex: none;
    width: 88px;
    height: 66px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-2);
}

.mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 700;
}

.mini-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mini-category {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.mini-copy strong {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-copy small {
    font-size: 0.68rem;
    color: var(--text-faint);
    margin-top: auto;
}

.mini-article:hover strong {
    color: var(--accent-strong);
}

.mini-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 26px;
}

.mini-links a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}

.mini-links li:last-child a,
.mini-links li:nth-last-child(2) a {
    border-bottom-color: transparent;
}

.mini-index {
    flex: none;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent-strong);
    padding-top: 2px;
}

.mini-links .mini-copy strong {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
}

.result-reading {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid rgba(99, 102, 241, 0.26);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, var(--accent-soft), transparent 62%),
        var(--surface);
}

.result-reading-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.result-reading-head h2 {
    font-size: 1.05rem;
}

.result-reading-head .eyebrow {
    margin-bottom: 5px;
}

.typing-articles {
    margin-top: 4px;
}

.section-head--tight {
    margin-bottom: 18px;
}

/* ------------------------------------------------------------
   Layout daftar artikel + sidebar
   ------------------------------------------------------------ */

.list-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 36px;
    align-items: start;
}

.list-main {
    min-width: 0;
}

.list-side {
    display: grid;
    gap: 18px;
}

.article-side,
.test-side {
    position: static;
}

@media (max-width: 1080px) {
    .list-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .list-side {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 640px) {
    .ad-band {
        padding: 2px 0 12px;
    }

    .ad-label {
        margin-bottom: 5px;
        font-size: 0.55rem;
        padding: 2px 7px;
    }

    .mini-articles,
    .mini-links {
        grid-template-columns: 1fr;
    }

    .mini-links li:nth-last-child(2) a {
        border-bottom-color: var(--border);
    }

    .result-reading {
        padding: 16px;
    }

    .result-reading-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-head-meta {
        display: none;
    }

    .ad-inline {
        margin: 26px 0;
    }
}

/* ------------------------------------------------------------
   Halaman legal, tentang, kontak
   ------------------------------------------------------------ */

.legal-page {
    padding: 54px 0 88px;
}

.legal-header {
    margin-bottom: 28px;
}

.legal-header h1 {
    font-size: clamp(1.9rem, 3.2vw, 2.65rem);
    letter-spacing: -0.035em;
    margin-bottom: 12px;
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--text-faint);
}

.legal-meta strong {
    color: var(--text-muted);
    font-weight: 600;
}

.legal-meta a {
    color: var(--accent-strong);
    font-weight: 600;
}

.legal-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.legal-toc a {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.legal-toc a:hover {
    color: var(--accent-strong);
    border-color: rgba(99, 102, 241, 0.35);
}

.legal-page .prose {
    max-width: 100%;
}

.legal-page .prose h2 {
    scroll-margin-top: calc(var(--header-height) + 20px);
    font-size: 1.32rem;
}

.table-wrap {
    margin: 1.3em 0;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.table-wrap table {
    min-width: 560px;
    margin: 0;
}

.table-wrap th:first-child,
.table-wrap td:first-child {
    padding-left: 16px;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
    padding-right: 16px;
}

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.footer-contact {
    margin-top: 10px;
    font-size: 0.82rem;
}

.footer-contact a {
    color: var(--accent-strong);
    font-weight: 600;
}

.footer-bottom a {
    color: var(--text-muted);
}

.footer-bottom a:hover {
    color: var(--accent-strong);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 34px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.contact-card h2 {
    font-size: 1rem;
}

.contact-card p {
    flex: 1;
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.contact-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-family: var(--font-mono);
    font-weight: 700;
}

.contact-notes {
    margin-top: 8px;
}

.contact-email {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-strong);
}

.ad-slot--adsense {
    min-height: 100px;
    padding: 12px;
    border: 1px dashed var(--border-strong);
    border-radius: 14px;
    background: var(--surface-2);
    overflow: hidden;
}

.ad-slot--adsense .adsbygoogle {
    display: block;
    min-height: 80px;
}

.ad-slot--custom {
    margin-bottom: 18px;
}

.ad-custom-code {
    width: 100%;
    overflow: hidden;
}

.ad-custom-code iframe {
    max-width: 100%;
    border: 0;
}

.ad-custom-code img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 640px) {
    .legal-page {
        padding: 38px 0 64px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        padding: 10px;
    }

    .legal-toc a {
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
