/* Agentline — hand-rolled design system. No build step, no external fonts. */
:root {
  --ink: #0b1b2b;
  --ink-2: #1e3347;
  --muted: #526273;
  --line: #e3e8ee;
  --soft: #f4f7f6;
  --paper: #ffffff;
  --sand: #faf8f3;
  --brand: #0f766e;
  --brand-2: #115e59;
  --brand-soft: #e6f4f1;
  --accent: #f59e0b;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --warn-soft: #fffaeb;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(11, 27, 43, 0.06), 0 8px 24px rgba(11, 27, 43, 0.06);
  --max: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--paper); }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
:focus-visible { outline: 3px solid #5eead4; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--soft); padding: 0.1em 0.35em; border-radius: 5px; }
pre { background: #0b1b2b; color: #d7e3ee; padding: 16px 18px; border-radius: var(--radius-sm); overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.12rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #0f766e, #14b8a6); display: grid; place-items: center; color: #fff; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 520; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--brand); }
.nav-links a.btn-primary, .mobile-menu a.btn-primary { color: #fff; }
.nav-toggle { display: none; margin-left: auto; }
.nav-toggle summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; }
.nav-toggle summary::-webkit-details-marker { display: none; }
.nav-toggle[open] .mobile-menu { display: flex; }
.mobile-menu { display: none; position: absolute; right: 16px; top: 60px; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; min-width: 210px; }
.mobile-menu a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.mobile-menu a:hover { background: var(--soft); }
@media (max-width: 860px) { .nav-links { display: none; } .nav-toggle { display: block; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; font: 600 0.97rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: #c4ced8; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f5c2bd; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-light { background: #fff; color: var(--ink); }
.btn-sm { padding: 7px 12px; font-size: 0.88rem; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 1.05rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(20, 184, 166, 0.28), transparent 60%), linear-gradient(180deg, #0b1b2b, #0f2a3d); color: #e7eef5; padding: 84px 0 92px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; }
.hero .lead { font-size: 1.2rem; color: #b8c7d6; max-width: 36rem; }
.hero .eyebrow { color: #5eead4; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.hero-note { font-size: 0.9rem; color: #8ea3b7; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 56px 0 64px; } }

.phone { background: #0a1622; border: 1px solid #22384c; border-radius: 28px; padding: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); max-width: 380px; margin-left: auto; }
.phone-top { display: flex; justify-content: space-between; color: #8ea3b7; font-size: 0.8rem; margin-bottom: 12px; padding: 0 6px; }
.bubble { border-radius: 16px; padding: 10px 14px; margin: 8px 0; font-size: 0.93rem; max-width: 88%; line-height: 1.45; }
.bubble.in { background: #16293a; color: #dbe6f0; border-bottom-left-radius: 4px; }
.bubble.out { background: var(--brand); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.bubble .meta { display: block; font-size: 0.72rem; opacity: 0.7; margin-bottom: 2px; }
.tool { font-family: var(--mono); font-size: 0.78rem; color: #5eead4; background: #0f2233; border: 1px dashed #24506a; border-radius: 10px; padding: 8px 10px; margin: 10px 0; }
.code-big { font: 700 1.4rem var(--mono); letter-spacing: 0.15em; }
@media (max-width: 900px) { .phone { margin: 0 auto; } }

/* Sections */
.section { padding: 84px 0; }
.section-alt { background: var(--sand); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } .section { padding: 56px 0; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card-pad-sm { padding: 18px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); margin: 0; }
.step-num { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; margin-bottom: 14px; }
.icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }

.logos { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: #d2dde8; font-size: 0.85rem; font-weight: 600; }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 24px; justify-content: center; }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } }
.plan { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--brand); }
.plan .badge-top { position: absolute; top: -12px; left: 30px; background: var(--brand); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.04em; }
.price { font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 26px; flex: 1; }
.plan li { padding: 7px 0 7px 28px; position: relative; color: var(--ink-2); }
.plan li::before { content: ""; position: absolute; left: 0; top: 12px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.fine { font-size: 0.88rem; color: var(--muted); }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 18px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 650; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 16px; color: var(--ink-2); }

/* Prose / legal */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.page-hero { padding: 64px 0 28px; background: var(--sand); border-bottom: 1px solid var(--line); }
.page-hero p { color: var(--muted); font-size: 1.1rem; max-width: 680px; }

.notice { border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 20px; border: 1px solid; }
.notice-warn { background: var(--warn-soft); border-color: #fedf89; color: #7a2e0e; }
.notice-ok { background: var(--ok-soft); border-color: #abefc6; color: #054f31; }
.notice-err { background: var(--danger-soft); border-color: #fecdca; color: #7a271a; }
.notice-info { background: var(--brand-soft); border-color: #b7e2da; color: #134e4a; }

/* Forms */
.form { display: grid; gap: 16px; }
label { font-weight: 600; font-size: 0.93rem; display: block; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.86rem; margin-top: 4px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea { width: 100%; padding: 11px 13px; border: 1px solid #cdd6df; border-radius: 9px; font: inherit; color: var(--ink); background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18); }
textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 450; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--brand); }
.input-group { display: flex; align-items: stretch; }
.input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group span { display: flex; align-items: center; padding: 0 12px; border: 1px solid #cdd6df; border-left: 0; border-radius: 0 9px 9px 0; background: var(--soft); color: var(--muted); white-space: nowrap; }
.auth-wrap { min-height: calc(100vh - 64px - 220px); display: grid; place-items: center; padding: 56px 20px; background: var(--sand); }
.auth-card { width: 100%; max-width: 440px; }

/* Footer */
.site-footer { background: #0b1b2b; color: #a9b8c7; padding: 56px 0 36px; font-size: 0.93rem; }
.site-footer a { color: #d2dde8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer-grid h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid #1f3346; margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* App shell */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
.sidebar { border-right: 1px solid var(--line); background: var(--sand); padding: 22px 14px; }
.sidebar nav { display: grid; gap: 2px; position: sticky; top: 86px; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 0.95rem; }
.sidebar a:hover { background: #fff; }
.sidebar a[aria-current="page"] { background: #fff; color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.app-main { padding: 32px 36px 64px; min-width: 0; }
.app-main h1 { font-size: 1.7rem; }
.page-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; overflow-x: auto; }
  .sidebar nav { display: flex; position: static; align-items: center; }
  .sidebar a { white-space: nowrap; }
  .sidebar form { margin: 0; }
  .sidebar .fine { display: none; }
  .big-number { font-size: 1.3rem; }
  .app-main { padding: 22px 18px 48px; }
}
.stat { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 0.88rem; }
.big-number { font: 700 1.6rem var(--mono); letter-spacing: 0.02em; color: var(--ink); }
.meter { height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.meter > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; background: var(--sand); }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: #fff; }
.table-wrap table tr:last-child td { border-bottom: 0; }
td.body-cell { max-width: 420px; word-break: break-word; }
.mono { font-family: var(--mono); font-size: 0.9em; }
.muted { color: var(--muted); }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: #abefc6; }
.badge-warn { background: var(--warn-soft); color: #b54708; border-color: #fedf89; }
.badge-err { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.badge-brand { background: var(--brand-soft); color: var(--brand); border-color: #b7e2da; }
.empty-state { text-align: center; padding: 48px 20px; border: 1px dashed #cdd6df; border-radius: var(--radius); color: var(--muted); background: #fff; }
.empty-state h3 { color: var(--ink); }
.key-reveal { font-family: var(--mono); background: var(--ink); color: #5eead4; padding: 14px 16px; border-radius: 10px; word-break: break-all; user-select: all; }
.inline-form { display: inline; }
.row-flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.email-body { white-space: pre-wrap; word-break: break-word; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; font-size: 0.96rem; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; font-size: 0.94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.doc-nav { position: sticky; top: 86px; display: grid; gap: 4px; font-size: 0.93rem; align-self: start; align-content: start; }
.doc-nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.docs-grid { display: grid; grid-template-columns: 200px 1fr; gap: 40px; }
@media (max-width: 860px) { .docs-grid { grid-template-columns: 1fr; } .doc-nav { position: static; } }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; } .mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }
.center { text-align: center; }
.cta-band { background: linear-gradient(135deg, #0f766e, #0b4f4a); color: #e6f4f1; border-radius: 22px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; color: #c8ebe5; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
