/* The public website. Independent of the app's Bootstrap 3 theme on purpose:
   nothing here should change when the app shell does, and the reverse. */
:root {
  --ink: #14213d;
  --ink-soft: #46506a;
  --muted: #6b7489;
  --line: #e3e7ef;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-deep: #0f1a33;
  --brand: #1b6ef3;
  --brand-dark: #1457c4;
  --accent: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 33, 61, .08);
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ps {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
.ps a { color: var(--brand); text-decoration: none; }
.ps a:hover { text-decoration: underline; }
.ps h1, .ps h2, .ps h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
.ps h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); }
.ps h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.ps h3 { font-size: 1.15rem; }
.ps p { margin: 0 0 1em; }
.ps img { max-width: 100%; height: auto; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.section { padding: 80px 0; }
.section.soft { background: var(--bg-soft); }
.section.deep { background: var(--bg-deep); color: #e7ecf7; }
.section.deep h2, .section.deep h3 { color: #fff; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: .75em; }
.deep .eyebrow { color: #7fb0ff; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 46em; }
.deep .lead { color: #b9c3da; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 1rem; border: 2px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; }
.ps .btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff !important; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink) !important; background: #fff; }
.btn-ghost:hover { border-color: var(--brand); }
.deep .btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.35); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }
.center .btn-row { justify-content: center; }

/* Header */
.ps-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.ps-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.ps-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink) !important; }
.ps-logo:hover { text-decoration: none !important; }
.ps-logo img { height: 34px; width: auto; }
.ps-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.ps-nav > a, .ps-nav summary { color: var(--ink) !important; font-weight: 500; padding: 8px 12px; border-radius: 8px; cursor: pointer; list-style: none; }
.ps-nav > a:hover, .ps-nav summary:hover { background: var(--bg-soft); text-decoration: none; }
.ps-nav summary::-webkit-details-marker { display: none; }
.ps-nav summary::after { content: " \25BE"; font-size: .8em; color: var(--muted); }
.ps-nav details { position: relative; }
.ps-menu { position: absolute; top: 44px; left: 0; width: 560px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ps-menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink) !important; }
.ps-menu a:hover { background: var(--bg-soft); text-decoration: none; }
.ps-menu strong { display: block; font-size: .95rem; }
.ps-menu span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.ps-actions { display: flex; gap: 8px; align-items: center; }
.ps-actions .btn { padding: 9px 16px; }
.ps-burger { display: none; }

@media (max-width: 900px) {
  .ps-header .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; }
  .ps-burger { display: block; margin-left: auto; }
  .ps-burger summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; }
  .ps-burger summary::-webkit-details-marker { display: none; }
  .ps-nav, .ps-actions { display: none; }
  .ps-burger[open] ~ .ps-nav, .ps-burger[open] ~ .ps-actions { display: flex; flex-direction: column; align-items: stretch; width: 100%; flex: none; }
  .ps-menu { position: static; width: auto; grid-template-columns: 1fr; box-shadow: none; }
}

/* Hero */
.hero { padding: 72px 0 80px; background: linear-gradient(180deg, #eef4ff 0%, #fff 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero .lead { font-size: 1.25rem; }
.hero-note { font-size: .9rem; color: var(--muted); margin-top: 1em; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* The hero illustration: a drawn panel, not a screenshot, so it never goes stale. */
.mock { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; font-size: .88rem; }
.mock-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.mock-card { background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; }
.mock-card b { display: block; font-size: 1.35rem; }
.mock-card small { color: var(--muted); }
.up { color: var(--accent); font-weight: 600; }
.down { color: var(--danger); font-weight: 600; }
.mock-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.mock-row code { font-family: Consolas, monospace; font-size: .85rem; color: var(--ink-soft); }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.red { background: #fde8e8; color: #b42318; }
.pill.amber { background: #fef3c7; color: #92400e; }
.pill.green { background: #d1fae5; color: #065f46; }
.pill.grey { background: var(--bg-soft); color: var(--ink-soft); }
.mock-spark { height: 60px; margin: 6px 0 12px; }

/* Grids and cards */
.grid { display: grid; gap: 20px; }
.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: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 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; }
.ps a.card { color: var(--ink); display: block; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ps a.card:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.card p { color: var(--ink-soft); margin: 0; font-size: .97rem; }
.card .more { display: inline-block; margin-top: 12px; color: var(--brand); font-weight: 600; font-size: .95rem; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: #e8f0fe; color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.icon svg { width: 24px; height: 24px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.ticks { list-style: none; padding: 0; margin: 1em 0 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: .6em; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 12px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

.limits { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 20px 24px; }
.limits h3 { color: #92400e; }
.limits ul { margin: 0; padding-left: 1.2em; color: #78350f; }

.principles .card h3 { display: flex; align-items: center; gap: 10px; }

/* Pricing */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.price { font-size: 2.6rem; font-weight: 800; line-height: 1; margin: 12px 0 4px; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan .ticks { flex: 1; margin-bottom: 20px; }
.plan .btn { text-align: center; }

/* CTA band */
.cta { background: linear-gradient(120deg, var(--brand) 0%, #3b5bdb 100%); color: #fff; border-radius: 20px; padding: 48px; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #dbe6ff; }
.cta .btn-primary { background: #fff; color: var(--brand) !important; }
.cta .btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.5); }
@media (max-width: 640px) { .cta { padding: 32px 20px; } }

/* Footer */
.ps-footer { background: var(--bg-deep); color: #aab4cc; padding: 56px 0 28px; font-size: .95rem; }
.ps-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.ps-footer h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }
.ps-footer ul { list-style: none; margin: 0; padding: 0; }
.ps-footer li { margin-bottom: 8px; }
.ps-footer a { color: #cfd7ea !important; }
.ps-footer .fine { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: .85rem; }
@media (max-width: 800px) { .ps-footer .cols { grid-template-columns: 1fr 1fr; } }

/* Tools (free tools pages) */
.tool-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.5em; }
.tool-form input[type=text], .tool-form input[type=url], .tool-form select { flex: 1 1 260px; padding: 13px 14px; font-size: 1rem; border: 1px solid #cdd4e1; border-radius: 10px; font-family: inherit; }
.tool-form input:focus, .tool-form select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.alert { border-radius: 10px; padding: 14px 16px; margin: 1em 0; }
.alert.error { background: #fde8e8; color: #7f1d1d; }
.alert.info { background: #e8f0fe; color: #1e3a8a; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.score { font-size: 3.5rem; font-weight: 800; line-height: 1; }
.meter { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* Articles (learn centre) */
.prose { max-width: 740px; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose code { background: var(--bg-soft); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: var(--bg-deep); color: #e7ecf7; padding: 16px; border-radius: 10px; overflow-x: auto; font-size: .9rem; }
.prose pre code { background: none; padding: 0; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1em; }

/* Log in and sign up (_AuthLayout) */
body.auth { background: var(--bg-soft); }
.auth-shell { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; min-height: 100vh; }
.auth-brand { background: linear-gradient(160deg, var(--brand) 0%, #3b5bdb 55%, var(--bg-deep) 100%); color: #fff; padding: 40px; display: flex; flex-direction: column; }
.auth .auth-logo { color: #fff !important; }
.auth-pitch { margin: auto 0; }
.auth-pitch h2 { color: #fff; font-size: 1.9rem; margin-bottom: .8em; }
.auth-pitch .ticks li { color: #e3ebff; }
.auth-foot { color: #b9c8f5; font-size: .85rem; margin: 0; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 480px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 36px; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: .25em; }
.auth-sub { color: var(--muted); margin-bottom: 1.5em; }
.auth-form .field { margin-bottom: 16px; flex: 1; min-width: 0; }
.auth-form .field-row { display: flex; gap: 14px; }
.auth-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.auth-form input, .auth-form textarea { width: 100%; padding: 11px 13px; font: inherit; font-size: 1rem; color: var(--ink); border: 1px solid #cdd4e1; border-radius: 10px; background: #fff; }
.auth-form textarea { resize: vertical; min-height: 64px; }
.auth-form input:focus, .auth-form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.auth-form .field.invalid input, .auth-form .field.invalid textarea { border-color: var(--danger); }
.auth-form .field.invalid label::after { content: " — required"; color: var(--danger); font-weight: 500; }
.auth-form .password { position: relative; }
.auth-form .password input { padding-right: 64px; }
.show-password { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--brand); font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 8px; cursor: pointer; }
.auth-form .hint { color: var(--muted); font-size: .85rem; margin: -6px 0 16px; }
.btn-block { display: block; width: 100%; text-align: center; margin-top: 8px; }
.btn[disabled] { opacity: .7; cursor: wait; }
.auth .auth-switch { text-align: center; margin: 22px 0 0; color: var(--ink-soft); }
.auth .auth-back { margin: 24px 0 0; font-size: .95rem; }
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand { padding: 14px 16px; }
  .auth-pitch, .auth-foot { display: none; }
  .auth-main { justify-content: flex-start; padding-top: 24px; }
  .auth-card { padding: 24px 20px; }
}
@media (max-width: 480px) { .auth-form .field-row { flex-direction: column; gap: 0; } }

/* Admin announcement banner (Views/Shared/_Announcement.cshtml). */
.site-announcement { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 48px 10px 16px; position: relative; font-size: 14px; line-height: 1.45; text-align: center; background: #e8f0fe; color: #1e3a8a; }
.site-announcement span { overflow-wrap: anywhere; }
.site-announcement button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; opacity: .7; }
.site-announcement button:hover { opacity: 1; background: rgba(0,0,0,.06); }
.site-announcement-success { background: #d1fae5; color: #065f46; }
.site-announcement-warning { background: #fef3c7; color: #78350f; }
.site-announcement-danger { background: #fde8e8; color: #7f1d1d; }
/* Optional promo code on sign-up, folded away unless a link filled it in. */
.auth-form .promo-field summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.auth-form .promo-field input { text-transform: uppercase; }
