/* jouwidealewebsite docs. Tokens follow jiw-lander/DESIGN.md: monochrome,
   hairlines first, pills for controls, one type family. */

:root {
  --paper: #ffffff;
  --paper-2: #f5f5f7;
  --paper-3: #ebebef;
  --ink: #1d1d1f;
  --ink-soft: #48484c;
  --ink-faint: #6f6f74;
  --rule: rgb(0 0 0 / 0.09);
  --rule-strong: rgb(0 0 0 / 0.16);
  --btn-bg: #1d1d1f;
  --btn-ink: #ffffff;
  --success: #1c7a48;
  --ai-bg: #eef4ff;
  --ai-rule: #cfdffb;
  --ai-ink: #1b4bb5;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b0b0d;
    --paper-2: #131316;
    --paper-3: #1a1a1e;
    --ink: #f5f5f7;
    --ink-soft: rgb(245 245 247 / 0.78);
    --ink-faint: rgb(245 245 247 / 0.62);
    --rule: rgb(255 255 255 / 0.11);
    --rule-strong: rgb(255 255 255 / 0.2);
    --btn-bg: #f5f5f7;
    --btn-ink: #0b0b0d;
    --success: #58c08b;
    --ai-bg: rgb(90 145 255 / 0.14);
    --ai-rule: rgb(130 170 255 / 0.3);
    --ai-ink: #a9c6ff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.site-header,
main,
.site-footer {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---- Header ---------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  flex: none;
  border-radius: 7px;
}

.brand-sub {
  color: var(--ink-faint);
  font-weight: 500;
}

.lang {
  display: flex;
  flex: none;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
}

.lang a,
.lang span {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  color: var(--ink-faint);
  text-decoration: none;
}

.lang span {
  background: var(--paper-3);
  color: var(--ink);
}

@media (max-width: 400px) {
  .brand-sub {
    display: none;
  }
}

/* ---- Type ------------------------------------------------------------ */

main {
  padding-block: 28px 56px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.032em;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.028em;
}

h3 {
  margin: 28px 0 8px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h4 {
  margin: 24px 0 4px;
  font-size: 15px;
  color: var(--ink-faint);
}

@media (min-width: 640px) {
  h1 {
    font-size: 40px;
  }
}

p {
  margin: 0 0 14px;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-strong);
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

strong {
  font-weight: 600;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

p code,
dd code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--paper-2);
}

.lede {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.45;
}

.crumb {
  margin-bottom: 20px;
  font-size: 14px;
}

.crumb a {
  color: var(--ink-faint);
  text-decoration: none;
}

.eyebrow {
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 500;
}

article > section {
  margin-top: 48px;
  scroll-margin-top: 16px;
}

/* ---- Buttons --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--btn-bg);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.btn-outline {
  border-color: var(--rule-strong);
  background: transparent;
  color: var(--ink);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-strong);
  cursor: pointer;
}

/* ---- Home ------------------------------------------------------------ */

.cards {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.card {
  display: grid;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color 0.18s;
}

.card:hover {
  border-color: var(--rule-strong);
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.card-body {
  color: var(--ink-soft);
  font-size: 15px;
}

.card-cta {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 500;
}

/* ---- Personalise ------------------------------------------------------ */

.icon {
  flex: none;
}

.personal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink-faint);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.pill .label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pill:hover {
  border-color: var(--rule-strong);
}

.pill.is-set {
  color: var(--ink);
}

.pill-edit {
  padding-left: 8px;
  border-left: 1px solid var(--rule-strong);
  color: var(--ink-faint);
  font-weight: 400;
}

/* The one tinted control on the page: hands the guide to an AI assistant. */
.pill-ai {
  border-color: var(--ai-rule);
  background: var(--ai-bg);
  color: var(--ai-ink);
}

.pill-ai:hover {
  border-color: var(--ai-ink);
}

.personal-panel {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
}

.personal-panel label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
}

.personal-row {
  display: flex;
  gap: 8px;
}

.personal-panel input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  /* 16px or more stops iOS from zooming the page on focus. */
  font-size: 16px;
}

.personal-panel input:focus {
  border-color: var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.personal-panel p {
  margin: 10px 0 8px;
  color: var(--ink-faint);
  font-size: 13px;
}

/* A value taken from the visitor's own address. */
.fill {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--ink-faint);
  overflow-wrap: anywhere;
}

.fill.is-set {
  color: var(--ink);
  font-weight: 600;
}

/* ---- Contents -------------------------------------------------------- */

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.toc a {
  padding: 7px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}

.toc a:hover {
  border-color: var(--rule-strong);
  color: var(--ink);
}

/* ---- Steps ----------------------------------------------------------- */

.steps {
  margin: 16px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li {
  position: relative;
  min-height: 28px;
  padding: 0 0 18px 42px;
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  top: -1px;
  left: 0;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.steps > li:last-child {
  padding-bottom: 0;
}

.steps p {
  margin: 0;
}

/* Values to type into an app, each with its own copy button. */
.set {
  margin: 10px 0 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  font-size: 15px;
}

.set-row {
  padding: 9px 12px;
}

.set-row + .set-row {
  border-top: 1px solid var(--rule);
}

.set dt {
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 500;
}

.set dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

.set dd code,
.set dd .fill {
  min-width: 0;
  padding: 0;
  background: none;
}

.copy {
  flex: none;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.copy:disabled {
  display: none;
}

.copy.is-done,
.link-btn.is-done {
  color: var(--success);
}

/* ---- Device and app picker ------------------------------------------- */

.picker {
  margin-top: 20px;
}

.picker-label {
  margin: 16px 0 8px;
  font-size: 14px;
  font-weight: 500;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.chip[aria-pressed='true'] {
  border-color: var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-ink);
}

.picker-prompt {
  margin: 20px 0 0;
  padding: 16px;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-md);
  color: var(--ink-faint);
  font-size: 15px;
}

/* A guide card. Once a device is chosen it borrows that platform's look
   (data-platform), so the page resembles the screen the reader is about to use. */
.guide {
  --g-bg: transparent;
  --g-cell: var(--paper);
  --g-border: var(--rule);
  --g-accent: var(--ink);
  --g-on-accent: var(--paper);
  --g-radius: var(--radius-lg);
  --g-cell-radius: var(--radius-sm);
  --g-ctl-radius: var(--radius-pill);
  margin-top: 24px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--g-border);
  border-radius: var(--g-radius);
  background: var(--g-bg);
}

.guide h3 {
  margin-top: 0;
}

.guide .set {
  border-radius: var(--g-cell-radius);
  background: var(--g-cell);
}

.guide .copy {
  border-radius: var(--g-ctl-radius);
}

.guide[data-platform] .steps > li::before {
  border-color: var(--g-accent);
  background: var(--g-accent);
  color: var(--g-on-accent);
}

.guide[data-platform] .steps strong {
  color: var(--g-accent);
}

.guide-chrome {
  display: none;
  align-items: center;
  margin: -20px -20px 18px;
}

/* iOS: grouped inset list on system grey, blue for anything you tap. */
.guide[data-platform='ios'] {
  --g-bg: #f2f2f7;
  --g-border: transparent;
  --g-accent: #0062cc;
  --g-on-accent: #ffffff;
  --g-radius: 24px;
  --g-cell-radius: 12px;
  font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
}

.guide[data-platform='ios'] .guide-chrome {
  display: flex;
  justify-content: center;
  height: 22px;
  margin-bottom: 8px;
}

.guide[data-platform='ios'] .guide-chrome::before {
  content: '';
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: rgb(60 60 67 / 0.3);
}

.guide[data-platform='ios'] h3 {
  font-size: 17px;
  letter-spacing: -0.01em;
  text-align: center;
}

.guide[data-platform='ios'] .set,
.guide[data-platform='ios'] .note {
  border-color: transparent;
}

.guide[data-platform='ios'] .note {
  background: var(--g-cell);
}

.guide[data-platform='ios'] .copy {
  border-color: transparent;
  background: transparent;
  color: var(--g-accent);
  font-size: 15px;
}

/* Android: Material surface tint, large radii, tonal buttons. */
.guide[data-platform='android'] {
  --g-bg: #f0f4fb;
  --g-border: transparent;
  --g-accent: #0b57d0;
  --g-on-accent: #ffffff;
  --g-radius: 28px;
  --g-cell-radius: 16px;
  --g-tonal: #d3e3fd;
  --g-on-tonal: #041e49;
  font-family: Roboto, 'Google Sans', system-ui, sans-serif;
}

.guide[data-platform='android'] h3 {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
}

.guide[data-platform='android'] .set {
  border-color: transparent;
}

.guide[data-platform='android'] .note {
  border-radius: 16px;
  background: var(--g-tonal);
  color: var(--g-on-tonal);
}

.guide[data-platform='android'] .copy {
  border-color: transparent;
  background: var(--g-tonal);
  color: var(--g-on-tonal);
}

/* macOS: a window with traffic lights. */
.guide[data-platform='mac'],
.guide[data-platform='web'] {
  --g-bg: #f6f6f6;
  --g-chrome: #e9e9eb;
  --g-border: var(--rule-strong);
  --g-accent: #0a5fd1;
  --g-on-accent: #ffffff;
  --g-radius: 12px;
  --g-cell-radius: 8px;
  --g-ctl-radius: 6px;
  box-shadow: 0 16px 36px -22px rgb(0 0 0 / 0.4);
  font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
}

.guide[data-platform='mac'] .guide-chrome,
.guide[data-platform='web'] .guide-chrome {
  display: flex;
  gap: 12px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--g-border);
  background: var(--g-chrome);
}

.guide[data-platform='mac'] .guide-chrome::before,
.guide[data-platform='web'] .guide-chrome::before {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 20px 0 0 #febc2e, 40px 0 0 #28c840;
  margin-right: 40px;
}

.guide[data-platform='mac'] h3 {
  font-size: 17px;
}

/* Browser: the same window with an address bar. */
.guide[data-platform='web'] {
  --g-bg: var(--paper);
}

.guide[data-platform='web'] .guide-chrome::after {
  content: 'purelymail.com/user/login';
  flex: 1;
  min-width: 0;
  padding: 4px 12px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--g-cell);
  color: var(--ink-faint);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Windows 11: square-ish corners, title bar controls, Fluent blue. */
.guide[data-platform='windows'] {
  --g-bg: #f3f3f3;
  --g-chrome: #e8ebf0;
  --g-border: var(--rule-strong);
  --g-accent: #005fb8;
  --g-on-accent: #ffffff;
  --g-radius: 8px;
  --g-cell-radius: 4px;
  --g-ctl-radius: 4px;
  box-shadow: 0 16px 36px -22px rgb(0 0 0 / 0.4);
  font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
}

.guide[data-platform='windows'] .guide-chrome {
  display: flex;
  justify-content: flex-end;
  height: 32px;
  padding: 0 14px;
  background: var(--g-chrome);
}

.guide[data-platform='windows'] .guide-chrome::after {
  content: '\2500\2003\2003\25A1\2003\2003\2715';
  color: var(--ink-soft);
  font-size: 11px;
}

.guide[data-platform='windows'] h3 {
  font-size: 20px;
}

.guide[data-platform='windows'] .steps > li::before {
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  .guide[data-platform='ios'] {
    --g-bg: #1c1c1e;
    --g-cell: #2c2c2e;
    --g-accent: #4da3ff;
    --g-on-accent: #00152e;
  }

  .guide[data-platform='ios'] .guide-chrome::before {
    background: rgb(235 235 245 / 0.3);
  }

  .guide[data-platform='android'] {
    --g-bg: #1b1f27;
    --g-cell: #262b35;
    --g-accent: #a8c7fa;
    --g-on-accent: #062e6f;
    --g-tonal: #0842a0;
    --g-on-tonal: #d3e3fd;
  }

  .guide[data-platform='mac'],
  .guide[data-platform='web'] {
    --g-bg: #1e1e20;
    --g-cell: #2a2a2d;
    --g-chrome: #2c2c2f;
    --g-accent: #5aa7ff;
    --g-on-accent: #00152e;
  }

  .guide[data-platform='web'] {
    --g-bg: var(--paper);
  }

  .guide[data-platform='windows'] {
    --g-bg: #202020;
    --g-cell: #2b2b2b;
    --g-chrome: #1a1d23;
    --g-accent: #60cdff;
    --g-on-accent: #00222e;
  }
}

/* With JavaScript only the chosen guide shows; without it, all of them do. */
.js .guide {
  display: none;
}

.js .guide.is-active {
  display: block;
}

.note {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 15px;
}

/* ---- Settings table --------------------------------------------------- */

.spec {
  margin: 16px 0 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
}

.spec > div {
  padding: 12px 16px;
}

.spec > div + div {
  border-top: 1px solid var(--rule);
}

.spec dt {
  color: var(--ink-faint);
  font-size: 13px;
  font-weight: 500;
}

.spec dd {
  margin: 2px 0 0;
  font-size: 16px;
}

@media (min-width: 640px) {
  .spec > div {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    align-items: baseline;
  }

  .spec dd {
    margin: 0;
  }
}

/* ---- Help ------------------------------------------------------------ */

.faq {
  border-top: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: none;
  color: var(--ink-faint);
  font-size: 20px;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '–';
}

.faq details p {
  color: var(--ink-soft);
  font-size: 16px;
}

.contact {
  margin-top: 28px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--paper-2);
}

.contact p {
  color: var(--ink-soft);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

/* ---- Footer ---------------------------------------------------------- */

.site-footer {
  padding-block: 24px 40px;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 14px;
}

.site-footer p {
  margin: 0 0 4px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

[hidden] {
  display: none !important;
}

/* Keep server names on one line next to their copy button on narrow phones. */
.set dd code,
.set dd .fill {
  font-size: 13.5px;
}

.guide[data-platform='ios'] .copy {
  padding-inline: 2px;
}

.set-note {
  color: var(--ink-faint);
  font-size: 13px;
}
