/* Plain CSS, no framework. */
:root {
  --ink: #1f2328;
  --muted: #59636e;
  --line: #d1d9e0;
  --paper: #ffffff;
  --page: #f6f8fa;
  --accent: #0b6e4f;
  --warn: #9a3412;
  --accent-soft: #e6f4ea;
  --accent-line: #9fd1b3;
  --warn-soft: #fdecea;
  --warn-line: #f2b8b5;
  /* Yellow: something waits for the customer (a held unsubscribe wave, a login warning, a preview to check). */
  --caution-soft: #fff6e0;
  --caution-line: #e8c46a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.top .brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.top .brand img { display: block; }
.top nav { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.top nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: none; }
.top nav form { display: inline; }

main { max-width: 860px; margin: 24px auto; padding: 0 16px; }

.bottom { max-width: 860px; margin: 40px auto 24px; padding: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.bottom p { margin: 8px 0 0; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

h1 { font-size: 1.5rem; margin: 0 0 12px; }
h2 { font-size: 1.15rem; margin: 0 0 8px; }

a { color: var(--accent); }

.button, button, input[type="submit"] {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

button.secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }

/* The confirm for data-turbo-confirm (layout, confirm_dialog.js), styled like a card. Mockup approved 2026-11-08. */
.confirm-dialog {
  width: calc(100% - 32px);
  max-width: 440px;
  padding: 18px 20px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.confirm-dialog::backdrop { background: rgba(31, 35, 40, 0.35); }
.confirm-dialog p { margin: 0 0 8px; }
.confirm-dialog-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }

button.link {
  border: 0;
  background: none;
  color: var(--accent);
  padding: 0;
  text-decoration: underline;
}

label { display: block; font-weight: 600; margin-top: 12px; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 2px 0 0; }
.choice { font-weight: normal; display: flex; gap: 8px; align-items: center; margin-top: 4px; }
/* Settings, the consent field (C5): the dropdown's options and the preview, green or yellow. */
.consent-options { border: 0; padding: 0; margin: 12px 0 0; }
.consent-options legend { font-weight: 600; padding: 0; }
.consent-count { color: var(--muted); font-size: 0.85rem; }
.consent-preview { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.consent-preview.warn { background: var(--caution-soft); border-color: var(--caution-line); }
.consent-preview.muted { background: var(--page); border-color: var(--line); color: var(--muted); }

/* Settings, the Sync settings card in four groups (approved 2026-11-08). Scoped to its form. */
.sync-settings .group { padding: 4px 0 20px; }
.sync-settings .group + .group { border-top: 1px solid var(--line); padding-top: 18px; }
.sync-settings .group h3 { font-size: 0.8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; font-weight: 700; }
.sync-settings .group label { margin-top: 14px; }
.sync-settings .group h3 + label,
.sync-settings .group h3 + .consent-picker > label:first-child { margin-top: 6px; }
.sync-settings .group select { margin-top: 6px; }
.sync-settings .hint { margin-top: 6px; }
.sync-settings .consent-options .choice { margin-top: 4px; }
.sync-settings details.more { margin-top: 6px; font-size: 0.9rem; color: var(--muted); }
.sync-settings details.more summary { color: var(--accent); cursor: pointer; }
.sync-settings details.more p { margin: 6px 0 0; }
.sync-settings .save-row { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 4px; }
.sync-settings .choices { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 6px; }
.sync-settings .choices .choice { margin-top: 0; }

/* Form fields (2026-10-28). Each field follows its label, so display: block puts it on its own line under the label.
   Only fields in main: the header's Sign out form and the checkbox rows (.choice) keep their own look. */
main input[type="text"],
main input[type="password"],
main input[type="date"],
main select {
  display: block;
  width: 100%;
  max-width: 420px;
  margin-top: 4px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

main input[type="text"]:focus,
main input[type="password"]:focus,
main input[type="date"]:focus,
main select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.2);
}

.flash { padding: 10px 14px; border-radius: 6px; background: #e6f4ea; border: 1px solid #a7d7b5; }
.flash-alert { background: #fdecea; border-color: #f5b5ab; color: var(--warn); }
.connection-warning { background: var(--caution-soft); border: 1px solid var(--caution-line); border-radius: 6px; padding: 10px 12px; margin: 10px 0 14px; }

.admin-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; justify-content: space-between; }

table { width: 100%; border-collapse: collapse; background: var(--paper); }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.85rem; color: var(--muted); }
.status-failed, .status-held { color: var(--warn); font-weight: 600; }
/* A wide table scrolls inside this box. A shadow on the right edge says there is more: the shadow stays at the box's
   edge (scroll), and a cover in the box's colour sits at the end of the table (local) and hides it once the table is
   scrolled to its end, or when the table fits. On a narrow screen the scrollbar always shows. */
.table-wrap {
  overflow-x: auto;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0), var(--paper) 60%) 100% 0 / 3rem 100% no-repeat local,
    linear-gradient(to right, rgba(31, 35, 40, 0), rgba(31, 35, 40, 0.18)) 100% 0 / 1.5rem 100% no-repeat scroll,
    var(--paper);
  scrollbar-color: #9aa4b2 transparent;
}

.table-wrap table { background: transparent; }

.table-wrap::-webkit-scrollbar {
  height: 10px;
}

.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: #9aa4b2;
}

@media (max-width: 900px) {
  .table-wrap { overflow-x: scroll; }
}

/* Landing page (2026-10-28): "/" for signed-out visitors. Wider than the other pages. */
main:has(> .home) { max-width: 1040px; }
body:has(.home) .bottom { max-width: 1008px; }

.button-large { padding: 11px 20px; border-radius: 8px; font-weight: 600; }

.hero { display: grid; gap: 32px; align-items: center; margin: 16px 0 48px; }
.hero h1 { font-size: 1.8rem; line-height: 1.15; margin: 0 0 16px; }
.subhead { font-size: 1.15rem; color: #3d444d; margin: 0 0 24px; }
.hero-note { color: var(--muted); font-size: 0.95rem; margin: 12px 0 0; }

@media (min-width: 860px) {
  .hero { grid-template-columns: 1fr 1.1fr; gap: 48px; }
  .hero h1 { font-size: 2.6rem; }
}

/* The example: Dana without SyncSquirrel (red) above Dana with SyncSquirrel (green). Each state holds a Mailchimp panel
   and a Zoho CRM panel side by side, also on a phone. */
.sync-example { margin: 0; display: grid; gap: 12px; }
.sync-state { border: 1px solid; border-radius: 12px; padding: 12px; }
.sync-state-without { background: var(--warn-soft); border-color: var(--warn-line); }
.sync-state-with { background: var(--accent-soft); border-color: var(--accent-line); }
.sync-state-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.sync-state-caption { margin: 8px 0 0; font-size: 0.85rem; }
.sync-state-without :is(.sync-state-title, .sync-state-caption) { color: var(--warn); }
.sync-state-with :is(.sync-state-title, .sync-state-caption) { color: var(--accent); }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 2px 10px rgba(31, 35, 40, 0.06);
  font-size: 0.9rem;
  min-width: 0;
}
.panel p { margin: 0; }
.panel-name { font-weight: 700; }
.row-name { font-weight: 600; overflow-wrap: anywhere; }
.row-name span { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.flag, .status { display: inline-flex; gap: 6px; align-items: center; margin-top: 4px !important; font-size: 0.82rem; }
.box {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
}
.flag-stop .box { background: var(--warn); }
.flag-stop { color: var(--warn); font-weight: 600; }
.status { padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.status-stop { background: var(--warn-soft); color: var(--warn); }
.status-neutral { background: #eef1f5; color: #3d444d; }

/* Read by screen readers, not shown. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.home section { margin-bottom: 48px; }
.home h2 { font-size: 1.5rem; margin: 0 0 16px; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li {
  counter-increment: step;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.steps h3 { font-size: 1.05rem; margin: 0 0 4px; }
.steps p { margin: 0; }

.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.points li { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.points strong { display: block; margin-bottom: 4px; font-size: 1.05rem; }

@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .points { grid-template-columns: repeat(2, 1fr); }
}

#faq { max-width: 680px; }
#faq h3 { font-size: 1.05rem; margin: 24px 0 4px; }
#faq p { margin: 0; }

.cta {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}
.cta h2 { margin-bottom: 8px; }
.cta p { margin: 0 0 16px; }
.cta .cta-links { margin: 16px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Pricing page (2026-10-28): one plan card, centered, with questions and answers under it. */
.pricing-head { text-align: center; margin: 16px 0 24px; }
.pricing-head h1 { font-size: 2.1rem; line-height: 1.15; margin: 0 0 8px; }
.pricing-head .subhead { margin: 0; }

.plan {
  max-width: 420px;
  margin: 0 auto 48px;
  padding: 28px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(31, 35, 40, 0.06);
  text-align: center;
}
.plan h2 { font-size: 1.15rem; margin: 0 0 12px; }
.plan p { margin: 0; }
.plan-price { font-size: 1.1rem; color: var(--muted); }
.plan-amount { font-size: 3rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.plan-unit { color: var(--muted); }
/* The early-access line (2026-11-08) runs to two or three lines, so a box with rounded corners, not a pill. */
.plan-trial {
  display: inline-block;
  margin-top: 12px !important;
  padding: 6px 12px;
  border-radius: 8px;
  background: #e6f4ea;
  color: var(--accent);
  font-weight: 600;
}
.plan-features { list-style: none; padding: 20px 0 0; margin: 20px 0 24px; border-top: 1px solid var(--line); display: grid; gap: 10px; text-align: left; }
.plan-features li { display: flex; gap: 10px; align-items: center; }
.plan-features .box { flex: none; background: var(--accent); }
.plan-button { display: block; }
.plan-note { margin-top: 10px !important; color: var(--muted); font-size: 0.9rem; }

.pricing-faq { margin: 0 auto 24px; }
.pricing-faq h2 { font-size: 1.5rem; margin: 0 0 8px; }

/* Settings card "Mailchimp subscribers not in Zoho" (Q3 mockup, 2026-11-08). */
.big { font-size: 1.75rem; font-weight: 700; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.row label { margin-top: 0; }
.bar { height: 8px; background: #e7ebf2; border-radius: 4px; overflow: hidden; margin: 10px 0 4px; }
.bar span { display: block; height: 100%; background: var(--accent); }
.card.dim { opacity: 0.55; }
/* Q2 mockup part 1: a hold still waiting for a decision is yellow; done and discarded cards are plain. */
.hold-card.hold-pending { background: var(--caution-soft); border-color: var(--caution-line); }

/* How it works and Privacy restructure (mockup 2026-11-08). */
.rule { font-weight: 700; margin: 0 0 8px; }
.card:has(> .rule) ul { padding-left: 1.25rem; }
.updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 8px; }
.in-short { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 8px; padding: 14px 20px; margin: 16px 0 20px; }
.in-short h2 { margin: 0 0 6px; }
.in-short ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 4px; }
.table-box { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
.stack-table ul { margin: 4px 0; padding-left: 1.1rem; }
.stack-table tr:last-child td { border-bottom: 0; }
.stored td:first-child { width: 50%; }
.stored td:last-child { width: 22%; }
.glance td:first-child { width: 50%; }
.glance { margin-top: 4px; }
.send-read { display: grid; gap: 4px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px 20px; margin-bottom: 16px; }
.send-read ul { margin: 0 0 8px; padding-left: 1.25rem; }
.send-read p { margin: 0 0 8px; }
.list-label { font-weight: 700; margin: 4px 0 4px !important; }
main > h3 { font-size: 1.05rem; margin: 16px 0 6px; }
@media (min-width: 760px) { .send-read { grid-template-columns: 1fr 1fr; } }
/* On a phone each row becomes a small block, with the column name above each cell. */
@media (max-width: 640px) {
  .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .stack-table tr { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .stack-table tr:last-child { border-bottom: 0; }
  .stack-table td { display: block; width: auto !important; padding: 2px 0; border: 0; }
  .stack-table td::before { content: attr(data-label); display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
  .glance tr { padding: 10px 0; }
}

/* Settings card for people archived or bounced in Mailchimp (mockup parts 1 to 3, approved 2026-11-08). */
.opt-out-group-name { font-weight: 700; margin: 16px 0 4px; }
.opt-out-select { width: 150px; }
.opt-out-select .choice { margin-top: 0; font-weight: 600; color: var(--ink); white-space: nowrap; }
.archived-card input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }
button[disabled] { opacity: 0.45; cursor: not-allowed; }
