:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #15181d;
  background: #eef1f4;
  --ink: #15181d;
  --muted: #66717f;
  --line: #d8dde4;
  --line-strong: #b8c0cb;
  --panel: #ffffff;
  --panel-subtle: #f8fafc;
  --accent: #087b83;
  --accent-strong: #065f66;
  --danger: #b42323;
  --warning: #9a5b00;
  --success: #1f6b3a;
  --shadow: 0 16px 42px rgba(21, 24, 29, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(#dfe5eb 1px, transparent 1px),
    linear-gradient(90deg, #dfe5eb 1px, transparent 1px),
    #eef1f4;
  background-size: 32px 32px;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 2.45rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  border-radius: 5px;
  padding: 0.58rem 0.82rem;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

button:hover,
button:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(8, 123, 131, 0.15);
}

button:active {
  transform: translateY(1px);
}

button.secondary,
.tab,
.warning-link {
  background: var(--panel);
  color: #26313d;
  border-color: var(--line-strong);
}

button.secondary:hover,
button.secondary:focus-visible,
.tab:hover,
.tab:focus-visible {
  background: #f3f6f8;
  border-color: #8b97a5;
  color: var(--ink);
}

.tab {
  min-height: 2.35rem;
}

.tab.active {
  border-color: var(--accent);
  background: #e8f6f7;
  color: var(--accent-strong);
}

.shell {
  width: min(1060px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 20px;
  border: 1px solid rgba(184, 192, 203, 0.75);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(21, 24, 29, 0.08);
  padding: 0.8rem 0.9rem;
  backdrop-filter: blur(14px);
}

.menu-toggle {
  display: none;
}

body.landing-mode .menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.24rem;
  width: 2.55rem;
  height: 2.55rem;
  min-height: 2.55rem;
  padding: 0;
  border-color: var(--line-strong);
  background: white;
  box-shadow: 0 12px 28px rgba(21, 24, 29, 0.12);
}

body.landing-mode .menu-toggle span {
  display: block;
  width: 1.12rem;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: #26313d;
}

body.landing-mode #main-nav {
  display: none;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: #101318;
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  color: #202832;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

#scheduled-heading {
  white-space: nowrap;
}

nav,
.actions,
.form-actions,
.section-head {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.section-head {
  justify-content: space-between;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.new-reminder-actions {
  margin-bottom: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.landing {
  display: grid;
  gap: 22px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.82fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  min-height: min(66vh, 620px);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.5rem, 5vw, 4rem) 0;
}

.landing-copy {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing h2 {
  margin: 0;
  color: #101318;
  font-size: clamp(2.35rem, 7vw, 5.6rem);
  font-weight: 900;
  line-height: 0.98;
  text-transform: none;
}

.landing-lede {
  max-width: 34rem;
  margin: 0;
  color: #4d5967;
  font-size: 1.08rem;
  line-height: 1.55;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.25rem;
}

.landing-actions a {
  color: #26313d;
  font-weight: 700;
  text-decoration: none;
}

.product-shot {
  display: grid;
  gap: 0.78rem;
  border: 1px solid rgba(184, 192, 203, 0.85);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 123, 131, 0.08), rgba(31, 107, 58, 0.08)),
    white;
  padding: clamp(1rem, 3vw, 1.4rem);
  box-shadow: 0 28px 64px rgba(21, 24, 29, 0.14);
}

.preview-bar {
  display: flex;
  gap: 0.36rem;
  padding-bottom: 0.2rem;
}

.preview-bar span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: #b8c0cb;
}

.preview-bar span:first-child {
  background: #e38b6c;
}

.preview-bar span:nth-child(2) {
  background: #e1bd57;
}

.preview-bar span:nth-child(3) {
  background: #63b97d;
}

.preview-task {
  display: grid;
  gap: 0.28rem;
  border: 1px solid var(--line);
  border-left: 4px solid #778292;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.9rem;
}

.preview-task.active {
  border-left-color: var(--accent);
}

.preview-task.muted {
  opacity: 0.72;
}

.preview-task strong {
  color: #141a22;
  font-size: 0.98rem;
}

.preview-task span {
  color: var(--muted);
  font-size: 0.86rem;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.landing-grid section {
  display: grid;
  gap: 0.5rem;
  background: var(--panel);
  padding: 1rem;
}

.landing-grid h3,
.auth-modal h3 {
  margin: 0;
  color: #1d2530;
  font-size: 1rem;
  font-weight: 850;
}

.landing-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    linear-gradient(#dfe5eb 1px, transparent 1px),
    linear-gradient(90deg, #dfe5eb 1px, transparent 1px),
    #f7f9fb;
  background-size: 32px 32px;
  padding: 1rem max(1rem, calc((100vw - 760px) / 2)) max(1rem, env(safe-area-inset-bottom));
}

.auth-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 249, 251, 0.94);
  padding: 0.25rem 0 0.9rem;
  backdrop-filter: blur(14px);
}

.auth-modal h2 {
  margin: 0.2rem 0 0;
  color: #101318;
  font-size: clamp(1.7rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: none;
}

.auth-modal-body {
  align-content: start;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 1rem;
}

.auth-modal-body section {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.auth-options {
  display: grid;
  gap: 0.55rem;
}

.form {
  display: grid;
  gap: 0.95rem;
}

label,
fieldset {
  display: grid;
  gap: 0.38rem;
  color: #475262;
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 0.62rem 0.72rem;
  color: var(--ink);
  background: var(--panel-subtle);
  font-size: 16px;
  font-weight: 500;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(8, 123, 131, 0.14);
}

textarea {
  resize: vertical;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.8rem;
  background: #fbfcfd;
}

legend {
  padding: 0 0.35rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.check input {
  width: 1rem;
  min-height: auto;
  accent-color: var(--accent);
}

.recurrence-fieldset {
  gap: 0.7rem;
}

.recurrence-frequency {
  margin-top: 0.15rem;
}

.upgrade-cta,
.upgrade-inline {
  color: var(--warning);
  font-weight: 800;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.list {
  display: grid;
  gap: 0.7rem;
}

#reminder-list {
  padding-top: 0.9rem;
}

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  background: linear-gradient(90deg, #fbfefe, white);
  padding: 0.95rem 1rem;
}

.item-actions {
  display: flex;
  gap: 0.45rem;
  justify-self: end;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.refresh-button {
  width: 2rem;
  height: 2rem;
  min-height: 2rem;
  font-size: 1rem;
}

.icon-button.danger {
  border-color: #e3b2b2;
  color: var(--danger);
}

.icon-button.danger:hover,
.icon-button.danger:focus-visible {
  background: #fff1f1;
  border-color: var(--danger);
}

.item h3 {
  margin: 0 0 0.28rem;
  color: #141a22;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.disclosure summary {
  display: block;
  cursor: pointer;
  color: #475262;
  font-weight: 800;
  padding: 0.15rem 0;
}

.disclosure summary::-webkit-details-marker {
  cursor: pointer;
}

.disclosure-body {
  margin-top: 0.8rem;
}

.reminder-modal {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--panel);
  padding: 1rem max(1rem, calc((100vw - 680px) / 2)) max(1rem, env(safe-area-inset-bottom));
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.25rem 0 0.9rem;
  backdrop-filter: blur(14px);
}

.reminder-modal-body {
  align-content: start;
  padding-top: 1rem;
}

.reminder-modal *,
.reminder-modal *::before,
.reminder-modal *::after {
  min-width: 0;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.recipient-status.unverified,
.recipient-status.pending,
.recipient-status.failed {
  color: var(--warning);
}

.recipient-status.verified {
  color: var(--success);
}

.warning-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  min-height: 1.4rem;
  margin-left: 0.3rem;
  padding: 0;
  border: 0;
  color: var(--warning);
  vertical-align: middle;
}

.warning-link::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  z-index: 2;
  display: none;
  width: max-content;
  max-width: 12rem;
  transform: translateX(-50%);
  border-radius: 5px;
  background: #171b21;
  color: white;
  content: attr(data-tooltip);
  font-size: 0.78rem;
  line-height: 1.2;
  padding: 0.35rem 0.5rem;
  pointer-events: none;
  white-space: normal;
}

.warning-link:hover::after,
.warning-link:focus-visible::after {
  display: block;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin-top: 0.55rem;
  border: 1px solid #b9dfe3;
  border-radius: 999px;
  background: #e8f6f7;
  color: var(--accent-strong);
  padding: 0.18rem 0.52rem;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-cancelled {
  border-color: #c9cfd8;
  background: #f2f4f7;
  color: #4f5967;
}

.status-failed {
  border-color: #e3b2b2;
  background: #fff1f1;
  color: var(--danger);
}

.status-expired {
  border-color: #e4c48f;
  background: #fff7e8;
  color: var(--warning);
}

.status-missed {
  border-color: #e4c48f;
  background: #fff7e8;
  color: var(--warning);
}

.status-sending {
  border-color: #c8b7e8;
  background: #f4efff;
  color: #5f3c9d;
}

.status-sent {
  border-color: #b6d8bf;
  background: #edf8f0;
  color: var(--success);
}

.message {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 30;
  width: min(calc(100% - 2rem), 26rem);
  margin: 0;
  transform: translateX(-50%);
  border: 1px solid #b6d9de;
  background: #eef9fa;
  color: #1f5961;
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 18px 42px rgba(21, 24, 29, 0.18);
}

.site-page {
  min-height: 100vh;
}

.site-shell {
  display: grid;
  gap: 18px;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(184, 192, 203, 0.75);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(21, 24, 29, 0.08);
}

.site-brand,
.site-nav a,
.site-footer a {
  color: #26313d;
  text-decoration: none;
}

.site-brand {
  font-size: 1.05rem;
  font-weight: 850;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.site-nav .site-cta {
  color: white;
}

.legal-shell {
  gap: 18px;
}

.legal-panel {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.legal-title {
  margin: 0 0 0.7rem;
  color: #101318;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.05;
}

.legal-updated {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.legal-panel section + section {
  margin-top: 1.15rem;
}

.legal-panel p {
  color: #4d5967;
  line-height: 1.65;
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1060px);
    margin-top: 12px;
  }

  .topbar {
    position: sticky;
    min-height: 3.25rem;
    padding: 0.72rem 3.35rem 0.72rem 0.8rem;
    border-radius: 7px;
  }

  .menu-toggle {
    position: absolute;
    top: 50%;
    right: 0.8rem;
    transform: translateY(-50%);
    z-index: 20;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.24rem;
    width: 2.55rem;
    height: 2.55rem;
    min-height: 2.55rem;
    padding: 0;
    border-color: var(--line-strong);
    background: white;
    box-shadow: 0 12px 28px rgba(21, 24, 29, 0.16);
  }

  .menu-toggle:active {
    transform: translateY(-50%);
  }

  .menu-toggle span {
    display: block;
    width: 1.12rem;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background: #26313d;
  }

  #main-nav {
    position: fixed;
    top: 4rem;
    right: 1rem;
    z-index: 19;
    display: none;
    width: min(13.5rem, calc(100vw - 2rem));
    padding: 0.65rem;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: white;
    box-shadow: 0 18px 42px rgba(21, 24, 29, 0.2);
  }

  #main-nav.open {
    display: grid;
    gap: 0.5rem;
  }

  .landing-hero,
  .landing-grid,
  .auth-modal-body {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    min-height: auto;
    padding: 1.4rem 0 1.6rem;
  }

  .landing h2 {
    font-size: clamp(2.25rem, 14vw, 4.2rem);
  }

  .actions,
  .form-actions,
  .row,
  .landing-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .actions button,
  .form-actions button,
  #main-nav button,
  .landing-actions button {
    width: 100%;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .panel {
    padding: 15px;
  }

  .item {
    grid-template-columns: 1fr;
    display: grid;
  }

  .item-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-self: stretch;
  }

  .item-actions .icon-button {
    width: 100%;
  }
}
