@import url("https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&family=Barlow:wght@300;400;500;600;700&display=swap");

:root {
  --white: #ffffff; --charcoal: #2f2e2e;
  --gray-700: #4a4949; --gray-600: #605e5e; --gray-400: #a0a09f; --gray-300: #cccccc; --gray-200: #e6e5e4; --gray-100: #f4f4f3;
  --slate-100: #bbd0e4; --slate-300: #80a6c8; --slate-500: #607d96; --slate-700: #405364; --slate-900: #202a32;
  --amber-100: #f3ecdd; --amber-200: #e6d8bd; --amber-500: #b0863f; --amber-700: #7a5f28; --amber-900: #5c4718;
  --red-100: #faf3f1; --red-200: #f0dcd6; --red-300: #e0c3b9; --red-400: #cf9a90; --red-500: #9a3b33; --red-700: #7a2e28;
  --green-100: #dbe7de; --green-200: #bcd2c1;
  --text-body: var(--charcoal); --text-muted: var(--gray-600); --text-faint: var(--gray-400); --text-inverse: var(--white);
  --surface-page: var(--white); --surface-muted: var(--gray-100); --surface-tint: var(--slate-100); --surface-ink: var(--slate-900);
  --border-subtle: var(--gray-300); --border-strong: var(--gray-400);
  --accent: var(--slate-500); --accent-hover: var(--slate-700);
  --link: var(--slate-500); --link-hover: var(--slate-700);
  --focus-ring: rgba(96, 125, 150, 0.45);
  --font-display: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  --font-body: 'Barlow', 'DIN Next', 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --shadow-sm: 0 1px 2px rgba(32, 42, 50, 0.06);
  --shadow-md: 0 4px 16px rgba(32, 42, 50, 0.08);
  --shadow-lg: 0 12px 40px rgba(32, 42, 50, 0.12);
  --ease: cubic-bezier(0.4, 0, 0.2, 1); --dur-fast: 140ms; --dur-med: 240ms;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--surface-page); color: var(--text-body); font-family: var(--font-body); font-size: 15px; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
p { line-height: 1.6; }
::selection { background: var(--slate-100); color: var(--slate-900); }
input, select, button, textarea { font-family: var(--font-body); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--slate-500) !important; box-shadow: 0 0 0 3px var(--focus-ring); }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.code { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mono { font-variant-numeric: tabular-nums; }

@keyframes ec-spin { to { transform: rotate(360deg); } }
@keyframes ec-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes ec-toast { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ec-nav { display: grid; grid-template-columns: 1fr minmax(0, 440px) 1fr; align-items: center; gap: 24px; padding: 13px 32px; border-bottom: 1px solid var(--border-subtle); position: sticky; top: 0; background: var(--surface-page); z-index: 30; }
.ec-nav-left { display: flex; align-items: center; gap: 16px 36px; flex-wrap: wrap; }
.ec-nav-logo img { height: 28px; width: auto; display: block; }
.ec-nav-links { display: flex; gap: 26px; flex-wrap: wrap; }
.ec-nav-link { font-family: var(--font-display); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-faint); padding-bottom: 3px; }
.ec-nav-link:hover { color: var(--text-muted); }
.ec-nav-link.active { font-weight: 600; color: var(--text-body); border-bottom: 2px solid var(--slate-500); }
.ec-nav-right { display: flex; align-items: center; gap: 18px; grid-column: 3; justify-content: flex-end; }
kbd { font-family: var(--font-body); font-size: 10.5px; font-weight: 500; color: var(--text-faint); border: 1px solid var(--gray-300); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; background: var(--white); }
.ec-search-trigger { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px 7px 11px; font-family: var(--font-body); font-size: 13.5px; color: var(--text-faint); background: var(--gray-100); border: 1px solid transparent; border-radius: 8px; cursor: pointer; transition: background var(--dur-fast) var(--ease); }
.ec-search-trigger:hover { background: var(--gray-200); }
.ec-search-trigger:focus-visible { outline: none; border-color: var(--slate-500); box-shadow: 0 0 0 3px var(--focus-ring); }
.ec-search-trigger svg { width: 14px; height: 14px; stroke: var(--text-faint); flex: none; }
.ec-search-trigger span { flex: 1; text-align: left; }
.ec-admin { position: relative; }
.ec-admin-trigger { display: flex; align-items: center; gap: 7px; cursor: pointer; font-family: var(--font-display); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted); background: var(--gray-100); border: none; border-radius: 8px; padding: 9px 14px; transition: background var(--dur-fast) var(--ease); }
.ec-admin-trigger svg { width: 13px; height: 13px; stroke: currentColor; transition: transform var(--dur-fast) var(--ease); }
.ec-admin:hover .ec-admin-trigger, .ec-admin:focus-within .ec-admin-trigger { background: var(--gray-200); color: var(--slate-700); }
.ec-admin:hover .ec-admin-trigger svg, .ec-admin:focus-within .ec-admin-trigger svg { transform: rotate(180deg); }
.ec-admin-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 190px; background: var(--surface-page); border: 1px solid var(--border-subtle); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px; display: none; animation: ec-fade var(--dur-fast) var(--ease); }
.ec-admin:hover .ec-admin-menu, .ec-admin:focus-within .ec-admin-menu { display: block; }
.ec-admin-menu::before { content: ""; position: absolute; inset: -24px 0 auto; height: 24px; }
.ec-admin-link { display: block; border-radius: 6px; padding: 9px 12px; font-family: var(--font-display); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); }
.ec-admin-link:hover { background: var(--gray-100); color: var(--slate-700); }
.ec-admin-link.active { font-weight: 600; color: var(--slate-700); background: var(--gray-100); }
.ec-admin-ext { float: right; opacity: 0.5; font-family: var(--font-body); font-size: 11px; letter-spacing: 0; }
.ec-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--slate-100); color: var(--slate-700); font-family: var(--font-display); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.ec-user { position: relative; }
.ec-user > summary { display: flex; align-items: center; gap: 12px; }
.ec-user-name { font-size: 14px; color: var(--text-muted); }
.ec-user-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; min-width: 180px; background: var(--surface-page); border: 1px solid var(--border-subtle); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px; animation: ec-fade var(--dur-fast) var(--ease); }
.ec-user-menu button { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 6px; padding: 9px 12px; font-family: var(--font-display); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); cursor: pointer; }
.ec-user-menu button:hover { background: var(--gray-100); color: var(--slate-700); }

.ec-main { flex: 1 0 auto; width: 100%; }
.ec-container { max-width: 1180px; margin: 0 auto; padding: 36px 40px 72px; width: 100%; }
.ec-footer { flex-shrink: 0; border-top: 1px solid var(--border-subtle); padding: 20px 32px; font-size: 12.5px; color: var(--text-faint); }
.ec-footer a { color: var(--text-faint); text-decoration: underline; }

.ec-eyebrow { font-family: var(--font-display); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.22em; color: var(--slate-500); }
.ec-h1 { font-family: var(--font-display); font-size: 34px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; color: var(--text-body); margin: 12px 0 0; }
.ec-h1.lg { font-size: 40px; font-weight: 400; }
.ec-h2 { font-family: var(--font-display); font-size: 22px; font-weight: 500; color: var(--text-body); margin: 0; }
.ec-tick { display: block; width: 48px; height: 3px; background: var(--slate-500); border-radius: 999px; margin: 20px 0 16px; }
.ec-lead { font-family: var(--font-body); font-size: 17px; line-height: 1.6; color: var(--text-muted); margin: 0; max-width: 660px; }
.ec-sub { font-size: 15px; color: var(--text-muted); margin: 8px 0 0; }
.ec-kicker { font-family: var(--font-display); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-faint); }
.ec-backlink { font-family: var(--font-display); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--slate-500); }
