/* DotLock web: Support + Privacy. One light theme, iOS grouped-list content, the unlock screen as the page head.
   Static, system fonts, nothing loaded from third parties. Every value's source in the app is listed in SOI.md. */

:root {
  color-scheme: light;

  /* iOS system colours (light), as the app uses them */
  --bg: #F2F2F7;          /* systemGroupedBackground */
  --cell: #FFFFFF;        /* secondarySystemGroupedBackground */
  --label: #000000;       /* label */
  --label-2: #6C6C70;     /* secondaryLabel on white, solid so it stays 5.2:1 */
  --separator: #C6C6C8;   /* opaqueSeparator */
  --accent: #007AFF;      /* AccentColor.colorset, light */
  --link: #0066DB;        /* link text: #007AFF darkened to 5.3:1 on white */

  /* Unlock screen, dark backdrop (PatternColors.backdrop(dark), glows, idle dots) */
  --night-1: #0B1026;
  --night-2: #1B1646;
  --night-3: #2A1B5C;
  --glow-blue: rgb(59 130 246 / 0.5);   /* 0x3B82F6 @ 0.5 */
  --glow-violet: rgb(168 85 247 / 0.45); /* 0xA855F7 @ 0.45 */
  --night-ink: #FFFFFF;
  --night-ink-2: rgb(255 255 255 / 0.7); /* PatternHeader subtitle: white @ 0.7 */
  --ring: rgb(255 255 255 / 0.22);       /* lock circle stroke, dark */
  --glass: rgb(255 255 255 / 0.12);

  /* Type: SF, iOS text styles */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --t-caption: 0.8125rem;   /* footnote 13 */
  --t-sub: 0.9375rem;       /* subheadline 15 */
  --t-body: 1.0625rem;      /* body / headline 17 */
  --t-title3: 1.25rem;      /* title3 20 */
  --t-title2: 1.375rem;     /* title2 22 */
  --t-title1: 1.75rem;      /* title1 28 */
  --t-large: 2.125rem;      /* largeTitle 34 */

  /* Space: iOS 4/8 rhythm, 16 row inset, 20 screen margin */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px; --s9: 64px;

  /* Radius by role (measured on the app screenshots) */
  --r-group: 26px;   /* inset grouped section, iOS 26 */
  --r-icon: 22.5%;   /* app icon squircle */
  --r-screen: 12%;   /* screenshot corners */

  --column: 44rem;   /* reading column, like an iPad readable width */
  --page: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgb(0 122 255 / 0.22); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p, ul, ol, dl, dd, figure, h1, h2, h3 { margin: 0; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: var(--s2); }
.skip:focus { left: var(--s4); background: var(--cell); padding: var(--s2) var(--s3); z-index: 3; }

/* Top bar: like an iOS navigation bar, small centred title */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 2;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 56px; padding-inline: var(--s5);
  color: var(--night-ink);
}
.bar.on-light { position: static; color: var(--label); background: var(--bg); border-bottom: 0.5px solid var(--separator); }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; color: inherit; font-weight: 600; font-size: var(--t-body); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: var(--r-icon); }
.bar .title { font-size: var(--t-body); font-weight: 600; text-align: center; }
.bar .other { justify-self: end; display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-body); }
.bar:not(.on-light) .other { color: var(--night-ink); }
@media (max-width: 480px) { .brand span { display: none; } }

/* Page head: the unlock screen */
.night {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(to bottom right, var(--night-1), var(--night-2) 50%, var(--night-3));
  color: var(--night-ink);
}
.night::before, .night::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
}
.night::before { width: 130vmax; height: 130vmax; left: -75vmax; top: -80vmax; background: radial-gradient(closest-side, var(--glow-blue), transparent); }
.night::after { width: 140vmax; height: 140vmax; right: -80vmax; bottom: -95vmax; background: radial-gradient(closest-side, var(--glow-violet), transparent); }

.head { text-align: center; padding: calc(56px + var(--s8)) var(--s5) var(--s8); }
.lock {
  width: 60px; height: 60px; margin: 0 auto var(--s3);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--ring);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.lock svg { width: 22px; height: 26px; }
.head h1 { font-family: var(--font-display); font-size: var(--t-large); line-height: 1.12; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: break-word; }
.head .lede { margin: var(--s3) auto 0; max-width: 32ch; color: var(--night-ink-2); font-size: var(--t-body); text-wrap: balance; }
.grid5 { width: min(76vw, 300px); margin: var(--s8) auto 0; }
.head .soon { margin-top: var(--s7); font-size: var(--t-sub); color: var(--night-ink-2); }
@media (min-width: 860px) {
  .head { padding-top: calc(56px + var(--s9)); padding-bottom: var(--s9); }
  .head h1 { font-size: 3rem; }
  .head .lede { font-size: var(--t-title3); max-width: 36ch; }
  .grid5 { width: 340px; }
}

/* Short head for the privacy page */
.head.short { padding-bottom: var(--s8); }
.head.short h1 { font-size: var(--t-title1); }
@media (min-width: 860px) { .head.short h1 { font-size: 2.5rem; } }

/* Content column */
.column { max-width: calc(var(--column) + 2 * var(--s5)); margin-inline: auto; padding: var(--s7) var(--s5) var(--s4); }
@media (max-width: 400px) { .column { padding-inline: var(--s4); } }

/* Inset grouped list */
.group + .group, .group + .group-text { margin-top: var(--s7); }
.group-head { padding: 0 var(--s4) var(--s2); font-size: var(--t-body); font-weight: 600; color: var(--label-2); line-height: 1.3; }
.cells { list-style: none; margin: 0; padding: 0; background: var(--cell); border-radius: var(--r-group); overflow: hidden; }
.cell { position: relative; padding: var(--s3) var(--s4); min-height: 52px; display: flex; flex-direction: column; justify-content: center; }
.cell + .cell::before { content: ""; position: absolute; top: 0; left: var(--s4); right: 0; border-top: 0.5px solid var(--separator); }
.cells.loose .cell { padding-block: var(--s4); }
.cell > * + * { margin-top: var(--s2); }
.cell .q { font-weight: 600; }
.cell .a { color: var(--label-2); }
.cell .a strong, .cell .path { color: var(--label); font-weight: 600; }
.path { white-space: nowrap; }
.path.wraps { white-space: normal; }
.group-foot { padding: var(--s2) var(--s4) 0; font-size: var(--t-caption); color: var(--label-2); line-height: 1.38; }
a.cell { color: var(--link); }
a.cell:hover { text-decoration: none; background: #E9E9EE; }
a.cell .mail { font-size: var(--t-body); overflow-wrap: anywhere; }

.steps { margin: 0; padding-left: 1.35em; color: var(--label-2); }
.steps li + li { margin-top: var(--s1); }
.steps li::marker { color: var(--label); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Real app screens */
.screens-wrap { max-width: var(--page); margin-inline: auto; padding: var(--s8) var(--s5) var(--s4); }
.screens-wrap .group-head { max-width: var(--column); }
.screens-wrap .intro { padding: 0 var(--s4); color: var(--label-2); max-width: var(--column); }
.screens {
  list-style: none; margin: var(--s6) calc(var(--s5) * -1) 0; padding: 0 var(--s5) var(--s3);
  display: grid; grid-auto-flow: column; grid-auto-columns: 64%; gap: var(--s5);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--s5);
}
.screens li { scroll-snap-align: start; min-width: 0; }
.screens img { width: 100%; border-radius: var(--r-screen) / 5.5%; box-shadow: 0 0 0 0.5px var(--separator), 0 6px 18px -8px rgb(11 16 38 / 0.25); }
.screens h3 { margin-top: var(--s4); padding-inline: var(--s1); font-size: var(--t-body); font-weight: 600; line-height: 1.3; }
.screens p { margin-top: var(--s1); padding-inline: var(--s1); font-size: var(--t-sub); color: var(--label-2); line-height: 1.4; }
@media (min-width: 860px) {
  .screens { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; gap: var(--s7); }
}

/* Privacy: intro and permission rows */
.doc-intro { padding: 0 var(--s4); }
.doc-intro .date { color: var(--label-2); font-size: var(--t-sub); }
.doc-intro p + p { margin-top: var(--s3); }
.term { font-weight: 600; }

/* Footer */
.foot { max-width: calc(var(--column) + 2 * var(--s5)); margin: var(--s8) auto 0; padding: var(--s5) calc(var(--s5) + var(--s4)) var(--s8); font-size: var(--t-caption); color: var(--label-2); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
.foot p { display: flex; align-items: center; min-height: 44px; }
.doc-intro + .group { margin-top: var(--s7); }
.doc-intro .q { font-size: var(--t-title3); font-weight: 600; line-height: 1.3; }
.doc-intro .a { margin-top: var(--s3); }

/* Round 2 fixes (SOI.md) */
.cell dd { margin-top: var(--s1); }
.steps strong { color: var(--label); font-weight: 600; }
.screens-wrap > .group-head, .screens-wrap > .intro { max-width: calc(var(--column)); margin-inline: auto; }
@media (min-width: 860px) {
  .grid5 { width: 280px; margin-top: var(--s7); }
  .head .soon { margin-top: var(--s6); }
  .head { padding-top: calc(56px + var(--s8)); padding-bottom: var(--s8); }
}
@media (max-width: 480px) { .foot { gap: 0 var(--s5); } }
@media (max-width: 400px) { .screens-wrap { padding-inline: var(--s4); } .screens { margin-inline: calc(var(--s4) * -1); padding-inline: var(--s4); scroll-padding-inline: var(--s4); } }
