/* =========================================================
   MrTrademark — shared styles
   Professional / legal feel with a touch of modern SaaS
   ========================================================= */

:root {
  --navy-900: #0b1e3f;
  --navy-800: #122a55;
  --navy-700: #1a3a6e;
  --navy-50:  #eef2f9;
  --ink:      #1a1f36;
  --muted:    #5c6378;
  --line:     #e4e7ef;
  --bg:       #f6f7fb;
  --card:     #ffffff;
  --accent:   #c9a14a;   /* warm gold — legal/serious */
  --accent-2: #6366f1;   /* indigo — modern SaaS pop */
  --success:  #15803d;
  --warning:  #b45309;
  --danger:   #b91c1c;
  --shadow:   0 1px 2px rgba(11,30,63,.06), 0 8px 24px rgba(11,30,63,.06);
  --radius:   10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Ensure the HTML [hidden] attribute always wins, even when a component
   class sets display:flex / grid / etc. */
[hidden] { display: none !important; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Source Serif Pro', 'Georgia', 'Times New Roman', serif;
  color: var(--navy-900);
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: 2.6rem; line-height: 1.15; }
h2 { font-size: 2rem;   line-height: 1.2;  }
h3 { font-size: 1.25rem; line-height: 1.3; }

p { margin: 0 0 1em; color: var(--ink); }
a { color: var(--navy-700); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

section { padding: 72px 0; }
section.tight { padding: 48px 0; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Source Serif Pro', Georgia, serif;
  font-size: 1.35rem; font-weight: 600;
  color: var(--navy-900);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--navy-900);
  color: var(--accent);
  border-radius: 6px;
  font-family: 'Source Serif Pro', Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--ink); font-size: .95rem; font-weight: 500; }
.nav-links a:hover { color: var(--navy-900); text-decoration: none; }

/* Avatar pill in top-right of app pages */
.nav-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-900);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .02em;
  border: 1px solid transparent;
  transition: all .15s ease;
}
.nav-avatar-link { display: inline-flex; align-items: center; }
.nav-avatar-link:hover { text-decoration: none; }
.nav-avatar-link:hover .nav-avatar {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
  box-shadow: 0 2px 6px rgba(11,30,63,.18);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
  line-height: 1;
}
.btn-primary { background: var(--navy-900); color: #fff; }
.btn-primary:hover {
  background: var(--navy-700);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(11,30,63,.18);
  transform: translateY(-1px);
}
.btn-accent { background: var(--accent); color: var(--navy-900); }
.btn-accent:hover { background: #b78d3a; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--navy-900); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--navy-900); }
.btn-ghost:hover { background: var(--navy-50); text-decoration: none; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: var(--line); }
.btn-danger-ghost:hover { background: #fef2f2; text-decoration: none; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 56px;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(99,102,241,.08), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 16px;
}
.hero h1 { margin-bottom: 18px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-trust {
  margin-top: 28px;
  font-size: .85rem;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.hero-trust .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

/* Hero illustration card */
.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.hero-card .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
}
.hero-card .row:last-child { border-bottom: 0; }
.hero-card .mark { font-weight: 600; color: var(--navy-900); }
.hero-card .reg  { color: var(--muted); font-size: .85rem; font-family: 'JetBrains Mono', monospace; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-block;
  font-size: .75rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .02em;
}
.pill-ok      { background: #dcfce7; color: #166534; }
.pill-warn    { background: #fef3c7; color: #92400e; }
.pill-danger  { background: #fee2e2; color: #991b1b; }
.pill-muted   { background: var(--navy-50); color: var(--navy-800); }

/* ---------- Section headings ---------- */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- "How it works" steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--navy-900); color: var(--accent);
  border-radius: 8px;
  font-family: 'Source Serif Pro', Georgia, serif;
  font-weight: 700;
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Pricing ---------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex; flex-direction: column;
}
.plan.featured {
  border-color: var(--navy-900);
  box-shadow: var(--shadow);
  position: relative;
  transform: translateY(-4px);
}
.plan-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--navy-900);
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  padding: 5px 10px; border-radius: 999px; text-transform: uppercase;
}
.plan h3 { font-family: 'Inter', sans-serif; font-size: 1rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.plan .price {
  font-family: 'Source Serif Pro', Georgia, serif;
  font-size: 2.4rem; color: var(--navy-900); font-weight: 600;
  display: flex; align-items: baseline; gap: 4px;
}
.plan .price small { font-size: .9rem; color: var(--muted); font-family: 'Inter', sans-serif; font-weight: 500; }
.plan .limit {
  color: var(--muted); font-size: .9rem; margin: 8px 0 18px;
}
.plan ul {
  list-style: none; padding: 0; margin: 0 0 24px;
  font-size: .92rem; color: var(--ink);
}
.plan ul li {
  padding: 7px 0;
  display: flex; gap: 10px;
}
.plan ul li::before {
  content: ""; flex-shrink: 0;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--navy-50);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230b1e3f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat; background-position: center;
}
.plan .btn { margin-top: auto; }

/* ---------- FAQ / footer ---------- */
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
}
.faq-item h3 { font-family: 'Inter', sans-serif; font-size: 1rem; margin-bottom: 6px; }
.faq-item p  { color: var(--muted); margin: 0; }

.site-footer {
  background: var(--navy-900); color: #cdd5e3;
  padding: 40px 0;
  font-size: .9rem;
}
.site-footer a { color: #cdd5e3; }
.site-footer .footer-grid {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px;
}
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { background: #fff; color: var(--navy-900); }

/* ---------- Cards (generic) ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--navy-900); margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(26,58,110,.15);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.help { font-size: .8rem; color: var(--muted); margin-top: 6px; }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .9rem; color: var(--ink);
  margin-bottom: 14px;
}
.checkbox-row input { margin-top: 3px; }

/* ---------- Plan-pick (sign up) ---------- */
.plan-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.plan-pick label {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  background: #fff;
  transition: all .15s ease;
}
.plan-pick label:hover { border-color: var(--navy-700); }
.plan-pick input { position: absolute; opacity: 0; pointer-events: none; }
/* Active state — darken the outer border only, no inner outline */
.plan-pick label:has(input:checked) {
  border-color: var(--navy-900);
  box-shadow: inset 0 0 0 1px var(--navy-900);
}
.plan-card .name { font-weight: 600; color: var(--navy-900); }
.plan-card .pr   { color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* ---------- App shell (dashboard, search) ---------- */
.app-shell { background: var(--bg); min-height: calc(100vh - 64px); }
.app-header {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 28px 0 20px;
}
.app-header .container {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 16px;
}
.app-header h1 { font-size: 1.7rem; margin: 0; }
.app-header p  { color: var(--muted); margin: 6px 0 0; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0; }
.metric {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px;
}
.metric .label { font-size: .8rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.metric .value { font-family: 'Source Serif Pro', Georgia, serif; font-size: 1.9rem; color: var(--navy-900); margin-top: 4px; }
.metric .sub   { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* ---------- Table ---------- */
.table-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.table-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  gap: 12px; flex-wrap: wrap;
}
.table-toolbar input[type="search"] {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  min-width: 260px;
}
table.tm {
  width: 100%; border-collapse: collapse;
  font-size: .92rem;
}
table.tm th, table.tm td {
  padding: 14px 22px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.tm th {
  background: #fafbfd;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 600;
}
table.tm tr:last-child td { border-bottom: 0; }
table.tm tr:hover td { background: #fafbfd; }
table.tm .mark-name { font-weight: 600; color: var(--navy-900); }
table.tm .mark-no   { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: .85rem; }
table.tm .actions   { white-space: nowrap; }

/* ---------- Spinner / loading ---------- */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--navy-900);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle;
}
.spinner-lg { width: 28px; height: 28px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.search-loading {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
  display: flex; align-items: center; gap: 14px;
}
.search-loading .text strong {
  display: block;
  color: var(--navy-900);
  font-size: .95rem;
  margin-bottom: 4px;
}
.search-loading .text small {
  color: var(--muted);
  font-size: .85rem;
}

.search-bar button[disabled] {
  background: var(--navy-700);
  cursor: progress;
  opacity: .85;
}

/* ---------- Search page specifics ---------- */
.search-bar {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: grid; grid-template-columns: 1fr auto; gap: 12px;
}
.search-bar input[type="search"] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 1rem;
}
.results { margin-top: 24px; }
.result {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 12px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
}
.result h3 { font-family: 'Inter', sans-serif; font-size: 1.05rem; margin: 0 0 4px; }
.result .meta { color: var(--muted); font-size: .88rem; display: flex; gap: 18px; flex-wrap: wrap; }
.result .meta span { display: inline-flex; gap: 6px; }
.result .meta b { color: var(--ink); font-weight: 500; }

/* ---------- Banner ---------- */
.banner {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff; padding: 48px;
  border-radius: 14px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.banner h2 { color: #fff; margin: 0 0 6px; font-size: 1.6rem; }
.banner p  { color: #cdd5e3; margin: 0; max-width: 540px; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .steps     { grid-template-columns: 1fr; }
  .pricing   { grid-template-columns: 1fr 1fr; }
  .plan-pick { grid-template-columns: 1fr 1fr; }
  .metrics   { grid-template-columns: 1fr 1fr; }
  h1         { font-size: 2rem; }
  h2         { font-size: 1.55rem; }
  .field-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.mobile-show { display: flex; flex-direction: column; }
  section    { padding: 56px 0; }
  .result    { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .pricing   { grid-template-columns: 1fr; }
  .plan-pick { grid-template-columns: 1fr; }
  .metrics   { grid-template-columns: 1fr; }
}

/* =========================================================
   Components for additional pages
   ========================================================= */

/* ---------- Two-column detail layout ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  margin-top: 28px;
}
@media (max-width: 880px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.detail-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px;
}
.detail-head h2 { margin: 0 0 6px; font-size: 1.8rem; }
.detail-head .reg { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: .9rem; }
.detail-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.info-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.info-cell {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.info-cell:nth-child(3n) { border-right: 0; }
.info-cell:nth-last-child(-n+3) { border-bottom: 0; }
.info-cell .label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.info-cell .value { margin-top: 4px; color: var(--navy-900); font-weight: 500; font-size: .95rem; }
@media (max-width: 540px) {
  .info-grid { grid-template-columns: 1fr; }
  .info-cell { border-right: 0; }
  .info-cell:not(:last-child) { border-bottom: 1px solid var(--line); }
}

/* ---------- Timeline ---------- */
.timeline {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
}
.timeline-list {
  list-style: none; margin: 0; padding: 0;
  position: relative;
}
.timeline-list::before {
  content: ''; position: absolute;
  top: 6px; bottom: 6px; left: 11px;
  width: 2px; background: var(--line);
}
.timeline-item {
  position: relative;
  padding: 0 0 20px 36px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute;
  left: 4px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--navy-900);
}
.timeline-item.done::before  { background: var(--navy-900); }
.timeline-item.warn::before  { border-color: var(--warning); }
.timeline-item.danger::before{ border-color: var(--danger); }
.timeline-item.future::before{ border-color: var(--line); }
.timeline-item .when {
  font-size: .8rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 2px;
}
.timeline-item .what { font-weight: 600; color: var(--navy-900); }
.timeline-item .desc { font-size: .9rem; color: var(--muted); margin-top: 2px; }

/* ---------- Side card ---------- */
.side-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.side-card h3 {
  font-family: 'Inter', sans-serif; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: 12px;
}
.side-card .countdown {
  font-family: 'Source Serif Pro', Georgia, serif;
  font-size: 2.4rem; color: var(--navy-900);
  line-height: 1;
}
.side-card .countdown small { font-size: 1rem; color: var(--muted); font-family: 'Inter'; }

/* ---------- Notification mockups ---------- */
.notif-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.notif-tab {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
  transition: all .15s;
}
.notif-tab.active {
  background: var(--navy-900); color: #fff; border-color: var(--navy-900);
}
.notif-tab:hover { border-color: var(--navy-700); text-decoration: none; }
.notif-tab.active:hover { background: var(--navy-800); }

.notif-grid {
  display: grid; grid-template-columns: 1.4fr .8fr; gap: 24px;
  align-items: start;
}
@media (max-width: 880px) {
  .notif-grid { grid-template-columns: 1fr; }
}

/* Email mock */
.email-mock {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.email-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fafbfd;
  font-size: .85rem;
}
.email-head .row { display: flex; gap: 10px; margin-bottom: 4px; }
.email-head .row b { width: 60px; color: var(--muted); font-weight: 500; }
.email-head .subj { color: var(--navy-900); font-weight: 600; font-size: .95rem; margin-top: 6px; }
.email-body {
  padding: 28px 30px;
  font-size: .93rem;
  line-height: 1.65;
}
.email-body h2 {
  font-family: 'Source Serif Pro', Georgia, serif;
  font-size: 1.4rem; color: var(--navy-900); margin: 0 0 14px;
}
.email-body .cta-row { margin: 22px 0 6px; }
.email-body .cta-row a {
  display: inline-block;
  background: var(--navy-900); color: #fff;
  padding: 11px 22px; border-radius: 8px;
  font-weight: 600; font-size: .9rem;
  text-decoration: none;
}
.email-body .footnote {
  border-top: 1px solid var(--line);
  margin-top: 24px; padding-top: 16px;
  font-size: .8rem; color: var(--muted);
}

/* Phone / SMS mock */
.phone-mock {
  background: #1a1f36;
  border-radius: 28px;
  padding: 18px 14px;
  max-width: 280px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(11,30,63,.25);
}
.phone-mock .notch {
  height: 6px; width: 60px; background: #0e1224;
  border-radius: 999px; margin: 0 auto 14px;
}
.phone-mock .screen {
  background: #f4f5fa;
  border-radius: 18px;
  min-height: 360px;
  padding: 12px;
  display: flex; flex-direction: column;
}
.phone-mock .clock {
  text-align: center; font-size: .75rem;
  color: #1a1f36; font-weight: 600;
  margin-bottom: 14px;
}
.phone-mock .bubble {
  background: #fff; border-radius: 14px;
  padding: 12px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.05);
  font-size: .85rem; line-height: 1.4;
  margin-top: auto;
}
.phone-mock .bubble .from { font-size: .7rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Walkthrough ---------- */
.walk-progress {
  display: flex; gap: 6px; margin-bottom: 32px;
}
.walk-progress span {
  flex: 1; height: 6px; border-radius: 999px; background: var(--line);
}
.walk-progress span.done { background: var(--navy-900); }
.walk-progress span.now  { background: var(--accent); }

.walk-step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 16px;
  display: grid; grid-template-columns: 60px 1fr; gap: 22px;
  align-items: start;
}
.walk-step .bigno {
  font-family: 'Source Serif Pro', Georgia, serif;
  font-size: 2.6rem; color: var(--accent);
  line-height: 1; font-weight: 600;
}
.walk-step h3 { margin: 0 0 8px; font-size: 1.2rem; }
.walk-step p  { color: var(--muted); margin: 0 0 8px; }
.walk-step .hint {
  background: var(--navy-50);
  border-left: 3px solid var(--navy-700);
  padding: 10px 14px; border-radius: 6px;
  font-size: .85rem; color: var(--navy-800);
  margin-top: 10px;
}

/* ---------- Settings tabs ---------- */
.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line);
  margin: 28px 0 28px; overflow-x: auto;
}
.tab {
  padding: 12px 16px;
  font-size: .92rem; font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.tab.active {
  color: var(--navy-900);
  border-bottom-color: var(--navy-900);
  font-weight: 600;
}
.tab:hover { color: var(--navy-900); text-decoration: none; }

.settings-section {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 18px;
}
.settings-section h3 {
  font-family: 'Inter', sans-serif; font-size: 1.05rem; color: var(--navy-900);
  margin-bottom: 4px;
}
.settings-section .desc {
  color: var(--muted); font-size: .9rem; margin-bottom: 20px;
}
.settings-row {
  display: grid; grid-template-columns: 220px 1fr auto;
  gap: 18px; align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.settings-row:first-of-type { border-top: 0; }
.settings-row .key { font-weight: 500; color: var(--ink); font-size: .9rem; }
.settings-row .val { color: var(--muted); font-size: .9rem; }
@media (max-width: 540px) {
  .settings-row { grid-template-columns: 1fr; }
}

/* Toggle */
.toggle {
  position: relative; display: inline-block;
  width: 44px; height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .track {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--line); border-radius: 999px;
  transition: .15s;
}
.toggle .track::before {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  transition: .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.toggle input:checked + .track { background: var(--navy-900); }
.toggle input:checked + .track::before { transform: translateX(20px); }

/* Inline editing */
.settings-row .row-actions {
  display: inline-flex; gap: 6px; align-items: center;
  justify-content: flex-end;
}
.inline-edit {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--navy-700);
  border-radius: 6px;
  font: inherit;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(26,58,110,.15);
}
.inline-edit:focus { outline: none; }
.settings-row.is-editing .val { padding-right: 8px; }

/* Plan-change inline panel */
.plan-change-panel {
  background: var(--navy-50);
  border: 1px dashed var(--navy-700);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}
.plan-change-panel h4 {
  margin: 0 0 12px;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--navy-900);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 1000;
  pointer-events: none;
}
.toast {
  background: var(--navy-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: .9rem;
  box-shadow: 0 8px 24px rgba(11,30,63,.25);
  animation: toast-in .2s ease-out, toast-out .25s ease-in 2.5s forwards;
  display: flex; align-items: center; gap: 10px;
}
.toast::before {
  content: '✓';
  font-weight: 700;
  color: var(--accent);
}
@keyframes toast-in  { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toast-out { to   { transform: translateY(20px); opacity: 0; } }

/* ---------- Modal / dialog ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(11,30,63,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: backdrop-in .15s ease-out;
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: 14px;
  max-width: 540px; width: 100%;
  padding: 28px 30px;
  box-shadow: 0 24px 60px rgba(11,30,63,.35);
  animation: modal-in .2s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.modal h2 {
  font-size: 1.4rem; margin: 0 0 6px;
}
.modal .sub {
  color: var(--muted); font-size: .9rem; margin-bottom: 22px;
}
.modal .mark-banner {
  background: var(--navy-50);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .9rem;
}
.modal .mark-banner b { color: var(--navy-900); }
.modal .mark-banner .reg { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: .8rem; }

/* Ownership radio cards */
.own-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.own-pick label {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 14px;
  cursor: pointer;
  background: #fff;
  transition: all .15s ease;
  position: relative;
}
.own-pick label:hover { border-color: var(--navy-700); }
.own-pick input { position: absolute; opacity: 0; pointer-events: none; }
.own-pick label:has(input:checked) {
  border-color: var(--navy-900);
  box-shadow: inset 0 0 0 1px var(--navy-900);
}
.own-pick .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy-50); color: var(--navy-900);
  margin-bottom: 10px; font-size: 1.1rem;
}
.own-pick .title { font-weight: 600; color: var(--navy-900); font-size: .95rem; margin-bottom: 4px; }
.own-pick .desc  { color: var(--muted); font-size: .82rem; line-height: 1.4; }

.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px;
}
@media (max-width: 540px) {
  .own-pick { grid-template-columns: 1fr; }
}

/* Role-aware content visibility (notifications preview) */
body[data-role="owner"]   [data-role-show="watcher"] { display: none !important; }
body[data-role="watcher"] [data-role-show="owner"]   { display: none !important; }

/* Role toggle pill group */
.role-toggle {
  display: inline-flex;
  background: var(--navy-50);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
}
.role-toggle button {
  background: transparent;
  border: 0;
  padding: 8px 18px;
  border-radius: 999px;
  font: inherit;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.role-toggle button.active {
  background: #fff;
  color: var(--navy-900);
  box-shadow: 0 1px 3px rgba(11,30,63,.12);
}

/* Ownership badges in lists */
.own-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .7rem; font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.own-badge.owner   { background: #ddedf7; color: #0b5394; }
.own-badge.watcher { background: #f5e8ff; color: #6b21a8; }

/* Plan summary on settings */
.plan-summary {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff; padding: 22px 26px; border-radius: var(--radius);
  margin-bottom: 18px;
  flex-wrap: wrap; gap: 14px;
}
.plan-summary h3 { color: #fff; margin: 0; font-family: 'Source Serif Pro', Georgia, serif; }
.plan-summary p  { color: #cdd5e3; margin: 4px 0 0; }

