/* Exemplified Write — website & dashboard */
:root { --bg: #f7f8fc; --panel: #fff; --line: #e3e7ef; --text: #172033; --muted: #667089; --accent: #2f5bea; --accent2: #6b3df5; --ok: #127a43; --warn: #a15c00; --err: #b42318; --radius: 14px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
.container { width: min(1120px, 100% - 32px); margin: 28px auto; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .fine { font-size: 13px; color: var(--muted); }
.inline { display: inline; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(16px, calc((100% - 1120px) / 2)); background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.topbar nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar nav a { color: var(--text); font-weight: 500; }
button.link { background: none; border: 0; color: var(--text); font: inherit; font-weight: 500; cursor: pointer; padding: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font: 600 15px system-ui, sans-serif; cursor: pointer; text-decoration: none; transition: transform .1s, box-shadow .2s; box-shadow: 0 4px 14px rgba(47, 91, 234, .25); }
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(47, 91, 234, .32); }
.btn.ghost { background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: #c5cde0; }
.btn.danger { background: var(--err); box-shadow: none; }
.btn.ghost.danger { background: var(--panel); color: var(--err); }
.btn.big { padding: 14px 24px; font-size: 16px; }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.tiny { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn.full { width: 100%; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.flash { padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; background: #eef3ff; border: 1px solid #cbd8ff; }
.flash.ok { background: #ebf8f1; border-color: #b9e6cc; color: #0f5132; }
.flash.err { background: #fdeeee; border-color: #f4c2c2; color: #8a1c1c; }
.banner { background: #eef3ff; border: 1px solid #cbd8ff; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; }
.banner.warn { background: #fff5e6; border-color: #f6d39b; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: #eef1f6; color: #47506a; vertical-align: middle; }
.pill.ok { background: #e3f6ec; color: var(--ok); } .pill.warn { background: #fff1db; color: var(--warn); }
code.key { font: 14px ui-monospace, Consolas, monospace; background: #f1f3f8; padding: 3px 7px; border-radius: 6px; word-break: break-all; }

label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
input:not([type=checkbox]):not([type=color]):not([type=file]), select { font: 15px system-ui, sans-serif; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
input:focus, select:focus { outline: 2px solid #c6d3ff; border-color: var(--accent); }
input.tiny { width: 64px; padding: 4px 6px !important; font-size: 13px !important; }
select.tiny-select { padding: 4px 6px !important; font-size: 13px !important; }

.auth { width: min(440px, 100%); margin: 40px auto; }
.auth h1 { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.steps { padding-left: 20px; } .steps li { margin-bottom: 6px; }

/* landing */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; width: min(1120px, 100% - 32px); margin: 0 auto; padding: 64px 0 40px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); background: #eef2ff; padding: 4px 12px; border-radius: 99px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); margin: 0 0 16px; }
.accent { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: #3b445b; margin: 0 0 24px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.mock-window { background: #fff; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(30, 41, 90, .18); overflow: hidden; transform: rotate(1deg); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #f3f5fa; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e5ec; display: inline-block; }
.mock-bar span { margin-left: 8px; }
.mock-tools { display: flex; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; color: #444; }
.mock-tools .on { background: #dfe6ff; color: #1d3fbf; border-radius: 5px; padding: 0 6px; font-weight: 600; margin-left: auto; }
.mock-page { padding: 22px 30px 14px; background: #eef0f5; }
.mock-page h3, .mock-page p { background: #fff; margin: 0; padding: 6px 18px; }
.mock-page h3 { padding-top: 18px; font-family: Georgia, serif; }
.muted-lines span { display: block; height: 8px; background: #e7eaf1; border-radius: 4px; margin: 8px 0; }
.muted-lines span.short { width: 60%; }
.mock-codes { border-top: 3px solid var(--accent); padding: 10px 14px; font: 12px/1.9 ui-monospace, Consolas, monospace; color: #333; background: #fff; }
.mock-codes .cur { display: inline-block; width: 7px; height: 13px; background: #e5383b; vertical-align: middle; }
.section { width: min(1120px, 100% - 32px); margin: 0 auto; padding: 56px 0; }
.section.alt { width: 100%; padding: 56px max(16px, calc((100% - 1120px) / 2)); background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: 32px; text-align: center; margin: 0 0 28px; }
.feat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #e8edff, #efe7ff); color: var(--accent); font-weight: 800; font-size: 18px; margin-bottom: 10px; }
.feat h3 { margin: 0 0 6px; }
.feat p { margin: 0; color: #4a5368; }
.table-wrap { overflow-x: auto; }
table.compare { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
table.compare th, table.compare td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; }
table.compare thead th { background: #f4f6fb; }
table.compare td.yes { color: var(--ok); font-weight: 600; }
table.compare td.no { color: #8a90a2; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin: 24px 0; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--accent); box-shadow: 0 12px 34px rgba(47, 91, 234, .15); }
.plan h3 { margin: 0; font-size: 20px; }
.badge { position: absolute; top: -12px; right: 18px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 99px; }
.price { font-size: 36px; font-weight: 800; margin: 8px 0 4px; }
.price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.ticks { list-style: none; padding: 0; margin: 8px 0 20px; flex: 1; }
.ticks li { padding: 5px 0 5px 26px; position: relative; }
.ticks li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.ticks li.off { color: #9aa1b2; text-decoration: line-through; }
.ticks li.off::before { content: '–'; color: #c0c5d1; }
.plan form { margin: 0; }
.faq { max-width: 780px; margin: 0 auto; }
.faq details { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: 10px 0 0; color: #4a5368; }
.cta-final { text-align: center; }
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { font-size: 19px; margin-top: 26px; }

/* dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.dash-head h1 { margin: 0; }
.dash-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dash-actions input[type=search] { width: 220px; padding: 9px 12px; }
.tabs { display: flex; gap: 4px; align-items: center; border-bottom: 1px solid var(--line); margin: 16px 0; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs .usage { margin-left: auto; font-size: 13px; }
.templates { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 18px; }
.tpl { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; font: 600 13px system-ui, sans-serif; color: var(--text); }
.tpl-page { width: 96px; height: 124px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.05); transition: .15s; position: relative; }
.tpl:hover .tpl-page { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(47, 91, 234, .18); }
.tpl-page.lines { background: #fff repeating-linear-gradient(#fff 0 12px, #e8ebf2 12px 15px) content-box; padding: 18px 14px; }
.tpl-page.grid { background: #fff linear-gradient(#e8ebf2 1px, transparent 1px) 0 0 / 100% 16px content-box, linear-gradient(90deg, #e8ebf2 1px, transparent 1px) 0 0 / 22px 100% content-box; padding: 18px 12px; }
.doc-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.doc-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-row:hover { background: #fafbff; }
.doc-main { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); font-weight: 600; }
.doc-main:hover { text-decoration: none; color: var(--accent); }
.doc-ico { color: var(--accent); font-size: 18px; }
.doc-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta { font-size: 13px; white-space: nowrap; }
.doc-btns { display: flex; gap: 4px; }
.doc-btns button { background: none; border: 1px solid transparent; border-radius: 7px; padding: 4px 9px; cursor: pointer; color: var(--muted); font: 13px system-ui, sans-serif; }
.doc-btns button:hover { border-color: var(--line); color: var(--text); background: #fff; }
.doc-btns button.danger:hover { color: var(--err); }
.empty { padding: 40px; }

/* billing + admin */
table.list { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.list th, table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
table.list thead th { background: #f4f6fb; font-size: 13px; color: var(--muted); }
table.list tr.dim { opacity: .55; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 18px 0; }
.stat { padding: 16px 18px; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat b { font-size: 24px; }
.searchbar { display: flex; gap: 8px; margin: 0 0 14px; }
.searchbar input { flex: 1; }
.admin-acts form { display: flex; gap: 4px; align-items: center; margin-bottom: 4px; }
.plan-edit { margin-bottom: 18px; }
.plan-edit h2 { margin-top: 0; font-size: 19px; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.checks label { margin: 0; }
.warnc { color: var(--warn); font-weight: 600 !important; }
section.card { margin-bottom: 18px; }
section.card h2 { margin-top: 0; font-size: 19px; }

.footer { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); background: #fff; }
.footer a { color: var(--muted); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-shot { display: none; }
  .topbar nav { gap: 12px; font-size: 14px; }
  .doc-row { flex-wrap: wrap; }
  .doc-meta { width: 100%; order: 3; }
}

.apps-line { margin: 2px 0 0; font-size: 14px; color: var(--accent); }
.apps-checks { align-items: center; }
.doc-ico.sheet { color: #1a8f4c; }
.tpl-page.sheet { background-color: #f3fbf6; border-color: #bfe3cd; }
.tpl-page.wide { width: 140px; height: 80px; margin-top: 44px; }
.tpl-page.slides { background: linear-gradient(#fff 0 30%, #e8ebf2 30% 36%, #fff 36%) content-box; padding: 12px 18px; }
.tpl-page.slides.bold { background: linear-gradient(135deg, #2f5bea, #6b3df5); }
.tpl-page.slides.green { background-color: #f0fdf4; }
.doc-ico.slides { color: #e8833a; }
.doc-ico.pdf { color: #c0392b; }
