/* AI Checker Plus: one stylesheet, mobile first (360px up), no external fonts. */
:root {
  --ink: #141833; --muted: #5b6185; --bg: #f5f6fb; --card: #fff; --line: #e3e6f2; --soft: #eef0fb;
  --brand: #3d4cf5; --brand-2: #2f3bd6; --brand-ink: #fff;
  --ai: #e5484d; --ai-bg: #fde8e9; --as: #c77a00; --as-bg: #fff1d6; --hu: #138a4b; --hu-bg: #dff5e8;
  --r: 14px; --shadow: 0 1px 2px rgba(20, 24, 51, .06), 0 8px 24px rgba(20, 24, 51, .06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
main { max-width: 860px; margin: 0 auto; padding: 0 16px 48px; }

.top { display: flex; align-items: center; justify-content: space-between; max-width: 860px; margin: 0 auto; padding: 14px 16px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; }
.logo b { color: var(--brand); }
.top nav { display: flex; gap: 16px; font-size: 15px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; }

.hero { text-align: center; padding: 18px 0 8px; }
.hero h1 { font-size: 28px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 auto 14px; max-width: 620px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.tool { padding: 12px; }
textarea { width: 100%; min-height: 220px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: inherit; color: var(--ink); background: #fbfbfe; }
textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; background: #fff; }
.tool-meta { display: flex; gap: 14px; align-items: center; font-size: 14px; color: var(--muted); padding: 8px 2px; }
.tool-meta #count { margin-right: auto; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
.ts:empty { display: none; }
.ts { margin: 4px 0 8px; }
.actions { display: grid; gap: 10px; }
.btn { appearance: none; border: 0; border-radius: 12px; padding: 14px 18px; font: inherit; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }
.badge { background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 99px; letter-spacing: .02em; }
.hint { font-size: 13px; color: var(--muted); text-align: center; margin: 10px 0 0; }
.error { color: var(--ai); font-weight: 600; margin: 10px 0 0; text-align: center; }

/* results */
.result { margin-top: 16px; display: grid; gap: 14px; }
.verdict { padding: 18px; }
.verdict .label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0; }
.verdict h2 { font-size: 24px; margin: 4px 0 2px; text-align: left; }
.verdict .big { font-size: 44px; font-weight: 800; line-height: 1; margin: 10px 0 4px; }
.verdict.v-ai .big, .verdict.v-ai h2 { color: var(--ai); }
.verdict.v-mixed .big, .verdict.v-mixed h2 { color: var(--as); }
.verdict.v-human .big, .verdict.v-human h2 { color: var(--hu); }
.bars { display: grid; gap: 8px; margin-top: 12px; }
.bar { display: grid; grid-template-columns: 112px 1fr 44px; align-items: center; gap: 8px; font-size: 14px; }
.bar .track { display: block; height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.bar .fill { display: block; height: 100%; border-radius: 99px; }
.bar.ai .fill { background: var(--ai); } .bar.as .fill { background: var(--as); } .bar.hu .fill { background: var(--hu); }
.bar .pct { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.warn { background: var(--as-bg); color: #6b4300; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-top: 12px; }

.marked { padding: 16px; }
.marked h3 { margin: 0 0 8px; font-size: 17px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend .l-ai i { background: var(--ai-bg); border: 1px solid var(--ai); } .legend .l-as i { background: var(--as-bg); border: 1px solid var(--as); } .legend .l-hu i { background: var(--hu-bg); border: 1px solid var(--hu); }
.text { white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.7; }
.text mark { color: inherit; border-radius: 3px; padding: 1px 0; }
.text mark.ai { background: var(--ai-bg); box-shadow: inset 0 -2px 0 var(--ai); }
.text mark.assisted { background: var(--as-bg); box-shadow: inset 0 -2px 0 var(--as); }
.text mark.human { background: var(--hu-bg); }
.locked { position: relative; margin-top: 4px; }
.locked .blur { filter: blur(5px); user-select: none; pointer-events: none; max-height: 220px; overflow: hidden; white-space: pre-wrap; }
.locked .cta { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.92) 45%); }
.locked .cta p { margin: 0 0 10px; font-weight: 700; }

.plag { padding: 16px; }
.plag h3 { margin: 0 0 6px; font-size: 17px; }
.plag .big { font-size: 34px; font-weight: 800; margin: 4px 0; }
.plag.clean .big { color: var(--hu); } .plag.match .big { color: var(--ai); }
.sources { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.sources li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.sources a { font-weight: 700; word-break: break-all; }
.sources q { display: block; color: var(--muted); margin-top: 6px; font-style: italic; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.row-actions .btn { padding: 10px 14px; font-size: 15px; }
.spinner { display: flex; align-items: center; gap: 12px; padding: 18px; font-weight: 600; }
.spinner::before { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--soft); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* marketing sections */
section h2 { font-size: 22px; margin: 36px 0 12px; text-align: center; }
.steps { padding-left: 20px; display: grid; gap: 8px; max-width: 620px; margin: 0 auto; }
.features { display: grid; gap: 12px; margin-top: 28px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.feature h3 { margin: 0 0 4px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.plans { display: grid; gap: 12px; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.plan.hot { border: 2px solid var(--brand); }
.plan .tag { position: absolute; top: -11px; left: 16px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; }
.plan h3 { margin: 0; font-size: 17px; }
.plan .price { font-size: 30px; font-weight: 800; }
.plan .price small { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan .per { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.plans.compact .plan { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: none; }
.plans.compact .pinfo { display: grid; gap: 2px; justify-items: start; }
.plans.compact .plan .btn { flex: none; padding: 10px 16px; }
.plans.compact .plan .price { font-size: 22px; }
.plans.compact .plan .per { margin: 0; }
.badge { white-space: nowrap; }

.fine { font-size: 13px; color: var(--muted); text-align: center; }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { color: var(--muted); margin: 8px 0 0; }

.modal { position: fixed; inset: 0; background: rgba(20, 24, 51, .5); display: grid; align-items: end; z-index: 10; }
.modal-card { position: relative; background: var(--card); border-radius: 18px 18px 0 0; padding: 22px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; }
.modal-card h2 { margin: 0 0 6px; text-align: left; font-size: 22px; }
.modal-card .sub { margin: 0 0 10px; }
.close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; }
.ticks { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.ticks li::before { content: "✓"; color: var(--hu); font-weight: 800; margin-right: 8px; }

.foot { text-align: center; padding: 24px 16px 40px; color: var(--muted); font-size: 14px; }
.foot a { color: var(--muted); }

/* simple pages: thanks, login, account, legal */
.page { max-width: 620px; margin: 0 auto; padding: 8px 16px 48px; }
.page .card { padding: 20px; }
.page h1 { font-size: 26px; margin: 8px 0 12px; }
.field { display: grid; gap: 6px; margin: 12px 0; }
.field input { font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.meter { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 6px 0; }
.meter > div { height: 100%; background: var(--brand); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.legal { max-width: 720px; margin: 0 auto; padding: 8px 16px 48px; }
.legal h1 { font-size: 26px; } .legal h2 { font-size: 18px; text-align: left; margin: 22px 0 6px; } .legal p, .legal li { color: #2b3050; }

@media (min-width: 720px) {
  .hero h1 { font-size: 40px; }
  .tool { padding: 16px; }
  textarea { min-height: 280px; }
  .actions { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .plans.compact { grid-template-columns: 1fr; }
  .modal { align-items: center; justify-items: center; }
  .modal-card { border-radius: 18px; max-width: 520px; width: 100%; }
}

@media print {
  .top nav, .tool, .how, .features, .pricing, .faq, .foot, .row-actions, .locked .cta { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
