/* Log out dialogs, the account menu, and the phone tour. Monochrome to match the app shell. */

/* ---------- Account menu (sidebar footer) ---------- */
.rail-bottom { position: relative; }
button.rail-account {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 8px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { button.rail-account:hover { background: #efefee; } }
.rail-account-chevron { margin-left: auto; width: 14px; height: 14px; color: #8a8a86; flex: none; }
.rail-account-menu {
  position: fixed; inset: auto auto 76px 12px; margin: 0; padding: 6px; width: 232px; border: 1px solid var(--line, #e4e4e1);
  border-radius: 14px; background: #fff; color: #181818; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  transform-origin: bottom left; opacity: 0; transform: scale(0.96) translateY(6px);
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), display 160ms allow-discrete, overlay 160ms allow-discrete;
}
.rail-account-menu:popover-open { display: grid; opacity: 1; transform: none; }
@starting-style { .rail-account-menu:popover-open { opacity: 0; transform: scale(0.96) translateY(6px); } }
.rail-menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; font: 500 14px var(--font, Inter, sans-serif); text-align: left; cursor: pointer;
}
.rail-menu-item svg { width: 18px; height: 18px; flex: none; }
@media (hover: hover) and (pointer: fine) { .rail-menu-item:hover { background: #f0f0ee; } }
.rail-menu-item:active { background: #e8e8e6; }
@media (max-width: 1160px) { .rail-account-menu { inset-inline-start: 8px; } }
@media (max-width: 900px) { .rail-menu-phone { display: none; } }
@media (max-width: 680px) {
  .rail-bottom { display: none; }
  button.rail-sheet-link { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
}

/* ---------- Shared dialog shell ---------- */
.es-dialog, .ept-dialog {
  box-sizing: border-box; padding: 0; border: 0; color: #181818; font-family: var(--font, Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}
.es-dialog { width: min(440px, calc(100vw - 32px)); border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22); }
.es-dialog::backdrop { background: rgba(20, 20, 18, 0.38); backdrop-filter: blur(2px); }
.es-dialog, .ept-dialog { transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), overlay 180ms allow-discrete, display 180ms allow-discrete; }
@starting-style { .es-dialog[open] { opacity: 0; transform: scale(0.97); } }
.es-card { padding: 28px 26px 22px; }
.es-kicker, .ept-kicker { margin: 0 0 10px; color: #58625b; font: 10px/1.5 var(--mono, monospace); letter-spacing: 0.06em; }
.es-card h1, .es-card h2 { margin: 0 0 12px; font-size: 26px; line-height: 1.1; letter-spacing: -0.04em; font-weight: 560; outline: none; text-wrap: balance; }
.es-copy { margin: 0 0 22px; color: #4c554f; font-size: 14px; line-height: 1.55; }
.es-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.es-actions--stack { flex-direction: column; align-items: stretch; }
.es-spacer { flex: 1; }
.es-primary, .es-quiet, .ept-primary, .ept-quiet, .ept-close {
  min-height: 46px; padding: 0 20px; border-radius: 12px; font: 500 14px var(--font, Inter, sans-serif); cursor: pointer;
}
.es-primary, .ept-primary { border: 1px solid #191919; background: #191919; color: #fff; }
.es-quiet, .ept-quiet, .ept-close { border: 1px solid #d9d9d5; background: #fff; color: #222; }
.ept-quiet:disabled { opacity: 0.45; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .es-primary:hover, .ept-primary:hover { background: #353531; }
  .es-quiet:hover, .ept-quiet:not(:disabled):hover, .ept-close:hover { background: #f4f4f1; }
}
.es-status, .ept-note { min-height: 1.4em; margin: 14px 0 0; color: #58625b; font-size: 12px; line-height: 1.5; }

/* ---------- Logged-out screen ---------- */
.es-dialog--lock {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; box-shadow: none;
  background: radial-gradient(ellipse 40% 36% at 50% 54%, rgba(164, 211, 184, 0.16) 0%, rgba(255, 255, 255, 0) 100%), #fff;
}
.es-dialog--lock::backdrop { background: #fff; backdrop-filter: none; }
.es-lock { display: grid; grid-template-rows: auto 1fr; min-height: 100dvh; padding: 28px clamp(24px, 5vw, 80px); }
.es-brand { color: #191919; font-size: 14px; font-weight: 650; letter-spacing: 0.025em; text-decoration: none; }
.es-card--lock { align-self: center; justify-self: center; width: min(460px, 100%); padding: 0 0 8vh; }
.es-card--lock h1 { font-size: clamp(34px, 5vw, 52px); }

/* ---------- Phone tour ---------- */
.ept-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; background: #f4f4f0; overflow: hidden; }
.ept-dialog::backdrop { background: #f4f4f0; }
.ept-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); height: 100dvh; max-width: 1280px; margin: 0 auto; }
.ept-copy { align-self: center; padding: 40px clamp(24px, 4vw, 56px); }
.ept-copy h2 { margin: 0 0 14px; font-size: clamp(34px, 4vw, 48px); line-height: 1.04; letter-spacing: -0.05em; font-weight: 550; outline: none; }
.ept-body { margin: 0 0 24px; color: #4c554f; font-size: 15px; line-height: 1.6; }
.ept-dots { display: flex; gap: 6px; margin: 0 0 26px; padding: 0; list-style: none; flex-wrap: wrap; }
.ept-dots button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; position: relative; }
.ept-dots button::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #c9c9c1; transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out); }
.ept-dots button.is-current::after { background: #191919; transform: scale(1.5); }
.ept-actions { display: flex; gap: 10px; }
.ept-note { max-width: 34ch; margin-top: 22px; }
.ept-stage { display: grid; place-items: center; min-width: 0; height: 100dvh; overflow: hidden; }
.ept-phone-wrap { --phone-scale: 1; position: relative; flex: none; width: calc(var(--outer-w) * var(--phone-scale)); height: calc(var(--outer-h) * var(--phone-scale)); }
.ept-phone {
  position: absolute; top: 0; left: 0; box-sizing: content-box; width: var(--phone-w); height: var(--phone-h); padding: var(--bezel);
  border-radius: 58px; background: #1b1b1a; box-shadow: 0 0 0 2px #3a3a38 inset, 0 40px 90px rgba(0, 0, 0, 0.28), 0 6px 18px rgba(0, 0, 0, 0.18);
  transform: scale(var(--phone-scale)); transform-origin: top left;
}
.ept-screenwrap { display: flex; flex-direction: column; width: var(--phone-w); height: var(--phone-h); overflow: hidden; border-radius: 46px; background: #fff; }
.ept-statusbar { position: relative; display: flex; align-items: center; justify-content: space-between; flex: none; height: var(--status-h); padding: 6px 30px 0 34px; background: #fafaf9; font: 600 15px/1 var(--font, Inter, sans-serif); color: #111; }
.ept-island { position: absolute; left: 50%; top: 10px; width: 112px; height: 32px; margin-left: -56px; border-radius: 20px; background: #000; }
.ept-signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.ept-signal i { display: block; width: 3px; border-radius: 1px; background: #111; }
.ept-signal i:nth-child(1) { height: 5px; } .ept-signal i:nth-child(2) { height: 8px; } .ept-signal i:nth-child(3) { height: 11px; }
.ept-signal b { display: block; width: 22px; height: 11px; margin-left: 6px; border: 1.5px solid #111; border-radius: 4px; background: linear-gradient(90deg, #111 72%, transparent 72%); }
.ept-screen { display: block; flex: 1 1 auto; width: 100%; min-height: 0; border: 0; background: #fff; }
.ept-home-bar { position: absolute; z-index: 2; bottom: calc(var(--bezel) + 8px); left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: rgba(0, 0, 0, 0.7); pointer-events: none; }
.ept-close {
  min-height: 46px; padding: 0 20px; border-radius: 12px; font: 500 14px var(--font, Inter, sans-serif); cursor: pointer;
}
.es-primary, .ept-primary { border: 1px solid #191919; background: #191919; color: #fff; }
.es-quiet, .ept-quiet, .ept-close { border: 1px solid #d9d9d5; background: #fff; color: #222; }
.ept-quiet:disabled { opacity: 0.45; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .es-primary:hover, .ept-primary:hover { background: #353531; }
  .es-quiet:hover, .ept-quiet:not(:disabled):hover, .ept-close:hover { background: #f4f4f1; }
}
.es-status, .ept-note { min-height: 1.4em; margin: 14px 0 0; color: #58625b; font-size: 12px; line-height: 1.5; }

/* ---------- Logged-out screen ---------- */
.es-dialog--lock {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; box-shadow: none;
  background: radial-gradient(ellipse 40% 36% at 50% 54%, rgba(164, 211, 184, 0.16) 0%, rgba(255, 255, 255, 0) 100%), #fff;
}
.es-dialog--lock::backdrop { background: #fff; backdrop-filter: none; }
.es-lock { display: grid; grid-template-rows: auto 1fr; min-height: 100dvh; padding: 28px clamp(24px, 5vw, 80px); }
.es-brand { color: #191919; font-size: 14px; font-weight: 650; letter-spacing: 0.025em; text-decoration: none; }
.es-card--lock { align-self: center; justify-self: center; width: min(460px, 100%); padding: 0 0 8vh; }
.es-card--lock h1 { font-size: clamp(34px, 5vw, 52px); }

/* ---------- Phone tour ---------- */
.ept-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; background: #f4f4f0; overflow: hidden; }
.ept-dialog::backdrop { background: #f4f4f0; }
.ept-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); height: 100dvh; max-width: 1280px; margin: 0 auto; }
.ept-copy { align-self: center; padding: 40px clamp(24px, 4vw, 56px); }
.ept-copy h2 { margin: 0 0 14px; font-size: clamp(34px, 4vw, 48px); line-height: 1.04; letter-spacing: -0.05em; font-weight: 550; outline: none; }
.ept-body { margin: 0 0 24px; color: #4c554f; font-size: 15px; line-height: 1.6; }
.ept-dots { display: flex; gap: 6px; margin: 0 0 26px; padding: 0; list-style: none; flex-wrap: wrap; }
.ept-dots button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; position: relative; }
.ept-dots button::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #c9c9c1; transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out); }
.ept-dots button.is-current::after { background: #191919; transform: scale(1.5); }
.ept-actions { display: flex; gap: 10px; }
.ept-note { max-width: 34ch; margin-top: 22px; }
.ept-stage { display: grid; place-items: center; min-width: 0; height: 100dvh; overflow: hidden; }
.ept-phone {
  --phone-scale: 1; position: relative; flex: none; box-sizing: content-box; width: var(--phone-w); height: var(--phone-h); padding: var(--bezel);
  border-radius: 58px; background: #1b1b1a; box-shadow: 0 0 0 2px #3a3a38 inset, 0 40px 90px rgba(0, 0, 0, 0.28), 0 6px 18px rgba(0, 0, 0, 0.18);
  transform: scale(var(--phone-scale)); transform-origin: center;
}
.ept-screen { display: block; width: var(--phone-w); height: var(--phone-h); border: 0; border-radius: 46px; background: #fff; }
.ept-island { position: absolute; z-index: 2; top: calc(var(--bezel) + 10px); left: 50%; width: 112px; height: 32px; margin-left: -56px; border-radius: 20px; background: #000; pointer-events: none; }
.ept-home-bar { position: absolute; z-index: 2; bottom: calc(var(--bezel) + 8px); left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: rgba(0, 0, 0, 0.7); pointer-events: none; }
.ept-close { position: fixed; top: 18px; left: 20px; z-index: 3; min-height: 40px; padding: 0 16px; }
@media (max-width: 900px) {
  .ept-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .ept-copy { padding: 64px 24px 8px; }
  .ept-stage { height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .rail-account-menu, .es-dialog, .ept-dialog { transition: opacity 120ms linear; transform: none; }
}

/* Visible phone-tour button in the sidebar (desktop and tablet widths only; .rail-menu-phone hides it below 900px). */
.rail-tour {
  display: flex; align-items: center; gap: 11px; width: calc(100% - 4px); min-height: 40px; margin: 10px 2px 0; padding: 0 10px;
  border: 1px dashed #c9c9c1; border-radius: 8px; background: transparent; color: #4e4e4c; font: 500 13px var(--font, Inter, sans-serif); cursor: pointer;
}
.rail-tour svg { width: 16px; height: 16px; flex: none; }
.rail-tour span { white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .rail-tour:hover { background: #efefee; border-style: solid; color: #171717; } }
@media (max-width: 1160px) { .rail-tour { justify-content: center; padding: 0; width: 44px; margin-inline: auto; } .rail-tour span { display: none; } }
