@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
}

:root {
  --ink: #242439;
  --quiet: #5e6072;
  --paper: #f9f9fc;
  --card: #fff;
  --rule: #dcdce7;
  --primary: #5850ec;
  --primary-hover: #4239ce;
  --tint: #efefff;
  --tint-border: #d9d7fc;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--ink);
  background: var(--paper);
  font-family: Geist, "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3, p, ul, dl { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
a, button, input, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.skip { position: absolute; z-index: 20; left: 1rem; top: -5rem; padding: .65rem 1rem; color: var(--ink); background: white; }
.skip:focus { top: 1rem; }
.icon { width: 1.2em; height: 1.2em; flex: 0 0 auto; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.button {
  display: inline-flex; min-height: 3rem; padding: .65rem 1rem; border: 1px solid transparent;
  border-radius: .4rem; align-items: center; justify-content: center; gap: .65rem;
  text-align: center; text-decoration: none; font-weight: 600; font-size: .94rem;
}
.button-primary { background: var(--primary); color: white; }
.button-primary:hover { background: var(--primary-hover); }
.button-outline { border-color: #bcbcca; background: transparent; color: var(--ink); }
.button-outline:hover { background: var(--tint); border-color: #9e9bd7; }
.button .icon { width: 1.15rem; height: 1.15rem; }
label { font-weight: 600; font-size: .9rem; }
input:not([type=hidden]) {
  width: 100%; min-width: 0; min-height: 3rem; padding: .7rem .85rem;
  color: var(--ink); border: 1px solid #aaaaba; border-radius: .4rem; background: white;
}
input::placeholder { color: #737387; opacity: 1; }
input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.text-link { color: var(--primary); text-underline-offset: .2em; font-weight: 540; }
.text-link:hover, .crumbs a:hover { color: var(--primary-hover); }
.brand-link { display: inline-flex; text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .8rem; color: var(--ink); font-size: 1.35rem; line-height: 1; letter-spacing: -.05em; font-weight: 610; }
.brand-logo { display: block; width: 2.2rem; height: 2.2rem; }
.notice { display: flex; align-items: flex-start; gap: .6rem; padding: .8rem 1rem; background: var(--tint); border-radius: .4rem; font-size: .94rem; margin-bottom: 1.25rem; overflow-wrap: anywhere; }
.notice .icon { margin-top: .17rem; }
.notice-error { background: #fae9e4; color: #792f24; }

/* The archive cover is a CSS drawing of four sealed envelopes. */
.login-layout { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
.cover {
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 43.5rem; padding: clamp(2rem,4vw,4.7rem) clamp(2.4rem,5vw,6rem) clamp(1.6rem,3.3vw,3.6rem);
  background: #eeedff; color: var(--ink);
}
.cover-brand { display: flex; align-items: center; }
.cover-content { width: 100%; margin: 2rem auto; }
.cover h2 { font-size: clamp(2.8rem,5vw,5.75rem); line-height: 1.04; letter-spacing: -.083em; font-weight: 520; }
.cover h2 span { color: var(--primary); }
.cover-content > p { max-width: 23rem; margin-top: 1.05rem; font-size: clamp(1rem,1.3vw,1.18rem); line-height: 1.5; color: #53546e; font-weight: 380; }
.cover-footer { display: flex; align-items: center; gap: .62rem; color: #565775; font-family: var(--mono); font-size: .81rem; }
.cover-footer .icon { width: 1rem; height: 1rem; }
.archive-art { max-width: 33rem; width: 100%; margin: .5rem auto clamp(1.65rem,3vw,3.5rem); }
.art-canvas { position: relative; aspect-ratio: 1.55; isolation: isolate; overflow: hidden; }
.art-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, #7973c3 1px, transparent 1.25px);
  background-size: 15px 15px; background-position: center; opacity: .42;
  mask-image: radial-gradient(ellipse at center, #000 32%, transparent 78%);
}
.register { position: absolute; width: .66rem; height: .66rem; color: #7772aa; opacity: .73; }
.register::before, .register::after { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: currentColor; }
.register::after { transform: rotate(90deg); }
.corner-nw { top: 5%; left: 1%; } .corner-ne { top: 5%; right: 1%; }
.corner-sw { bottom: 5%; left: 1%; } .corner-se { bottom: 5%; right: 1%; }
.sheet {
  position: absolute; width: 51%; height: 47%; left: 24.5%;
  border: 1.9px solid currentColor; border-radius: 2%; transform: matrix(.88,-.39,.76,.52,0,0);
  color: #908bc4; background: #dddaf5; overflow: hidden;
}
.sheet-low { top: 49%; border-style: dashed; background-color: #e4e1f8; }
.sheet-middle { top: 39%; color: #7b75bd; background: #d7d4f7; }
.sheet-upper { top: 29%; color: #746bbf; background: #b9b3f4; }
.sheet-top {
  top: 14.5%; background: var(--primary); border: 2px solid #5147d6; color: #eeedff;
  box-shadow: -2px 3px 0 #443bb7;
}
.fold, .fold-back { position: absolute; display: block; inset: 0; background: currentColor; }
.fold { clip-path: polygon(0 0,1.5% 0,50% 53%,98.5% 0,100% 0,100% 1.5%,50% 56%,0 1.5%); }
.fold-back { opacity: .75; clip-path: polygon(0 100%,0 98%,37.1% 41.5%,38.3% 42.8%,2% 100%,98% 100%,61.7% 42.8%,62.9% 41.5%,100% 98%,100% 100%); }
.login-main { display: flex; align-items: center; justify-content: center; padding: 3rem clamp(1.5rem,5.5vw,6.75rem); }
.login-panel { width: 100%; max-width: 25.25rem; }
.form-emblem { width: 3.15rem; height: 3.15rem; display: grid; place-items: center; border: 1px solid var(--tint-border); border-radius: .77rem; background: var(--tint); }
.form-emblem .icon { color: var(--primary); width: 1.55rem; height: 1.55rem; }
.login-panel h1, .error-page h1 { font-weight: 570; font-size: clamp(2.35rem,3.75vw,3.6rem); line-height: 1.06; letter-spacing: -.073em; margin-top: 1.55rem; }
.lead { color: var(--quiet); margin: .95rem 0 1.95rem; line-height: 1.56; overflow-wrap: anywhere; }
.lead strong { color: var(--ink); font-weight: 550; }
.google-login { width: 100%; }
.form-divider { display: flex; align-items: center; gap: .8rem; margin: 1.4rem 0; color: var(--quiet); font-size: .81rem; }
.form-divider::before, .form-divider::after { content: ''; height: 1px; flex: 1; background: var(--rule); }
.auth-form, .share-form { display: grid; gap: .46rem; }
.auth-form .button { margin-top: .55rem; }
.form-note { color: var(--quiet); font-size: .83rem; line-height: 1.5; margin-top: .9rem; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--quiet); }
.input-icon input { padding-left: 2.8rem; }
.code-field { font-family: var(--mono); letter-spacing: .35em; }
.change-email { display: inline-block; margin-top: 1.35rem; font-size: .92rem; }

/* Authenticated archive */
.app-header { background: var(--card); color: var(--ink); border-bottom: 1px solid var(--rule); }
.app-header-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: auto; max-width: 81rem; min-height: 4.65rem; padding: .85rem clamp(1rem,5vw,4rem); }
.account { display: flex; align-items: center; gap: 1.35rem; min-width: 0; font-size: .87rem; }
.account-email { color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout { display: flex; align-items: center; gap: .42rem; padding: .45rem .7rem; border: 1px solid var(--tint-border); color: var(--primary); border-radius: .35rem; background: transparent; }
.logout:hover { background: var(--tint); }
.workspace { max-width: 81rem; margin: auto; padding: clamp(2rem,4.5vw,4.75rem) clamp(1rem,5vw,4rem) 4rem; }
.section-head { margin: 0 0 clamp(1.6rem,3vw,2.7rem); overflow-wrap: anywhere; }
.section-head h1 { font-size: clamp(2.3rem,4.5vw,4.65rem); line-height: 1.08; letter-spacing: -.073em; font-weight: 540; }
.accent-period { color: var(--primary); }
.section-head > p, .section-head > div > p { margin-top: .7rem; color: var(--quiet); }
.handles { border-top: 1px solid var(--ink); }
.list-header, .handle-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(7.5rem,.28fr) minmax(8.5rem,.28fr); align-items: center; gap: 1.15rem; }
.list-header { padding: .8rem .9rem; border-bottom: 1px solid var(--rule); font-size: .85rem; font-weight: 550; color: var(--quiet); }
.handle-row { padding: 1.2rem .9rem; border-bottom: 1px solid var(--rule); text-decoration: none; }
.handle-row:hover { color: var(--primary); background: var(--tint); }
.handle-primary { min-width: 0; display: flex; align-items: center; gap: .9rem; }
.handle-tile, .empty-tile { flex: 0 0 auto; display: grid; place-items: center; background: var(--tint); color: var(--primary); border-radius: .43rem; }
.handle-tile { width: 2.8rem; height: 2.8rem; }
.handle-tile .icon { width: 1.45rem; height: 1.45rem; }
.handle-primary > div { min-width: 0; }
.handle-primary h2 { font-size: 1.15rem; letter-spacing: -.035em; font-weight: 610; overflow-wrap: anywhere; }
.handle-primary p { color: var(--quiet); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.access { display: flex; align-items: center; gap: .45rem; white-space: nowrap; font-size: .85rem; color: var(--primary); font-weight: 540; }
.last-time { font-size: .88rem; color: var(--quiet); }
.empty-state { background: #f3f3fb; border: 1px solid var(--rule); border-radius: .6rem; padding: clamp(1.5rem,6vw,4.5rem) 1.25rem; text-align: center; }
.empty-tile { margin: 0 auto 1rem; width: 3.55rem; height: 3.55rem; border: 1px solid var(--tint-border); background: var(--tint); }
.empty-tile .icon { width: 1.6rem; height: 1.6rem; }
.empty-state h2 { font-size: clamp(1.4rem,2.5vw,1.9rem); letter-spacing: -.045em; font-weight: 560; }
.empty-state p { margin: .65rem auto 0; color: var(--quiet); max-width: 34rem; overflow-wrap: anywhere; }
.inline-address { font-weight: 540; color: var(--ink); }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .38rem; margin-bottom: 1.45rem; font-size: .88rem; color: var(--quiet); }
.crumbs .icon { width: .86rem; height: .86rem; }
.crumbs a { color: var(--primary); text-underline-offset: .19rem; }
.crumbs span { overflow-wrap: anywhere; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.detail-head > div:first-child { min-width: 0; }
.detail-head .access { margin-top: .7rem; }
.handle-address { display: flex; align-items: center; gap: .48rem; }
.handle-address a { min-width: 0; color: var(--primary); text-decoration: none; overflow-wrap: anywhere; }
.handle-address a:hover { text-decoration: underline; }
.conversation-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(15rem,.39fr); gap: clamp(1.5rem,3vw,2.8rem); align-items: start; }
.subhead { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding-bottom: .8rem; border-bottom: 1px solid var(--ink); }
.subhead h2 { font-size: 1.22rem; letter-spacing: -.04em; font-weight: 600; }
.subhead span, .subhead > .icon { color: var(--quiet); font-size: .86rem; }
.side-panel { background: #f3f3fb; border: 1px solid var(--rule); border-radius: .5rem; padding: 1.05rem 1.15rem; }
.side-panel .subhead { border-color: var(--rule); }
.side-panel h3 { font-weight: 600; font-size: .9rem; margin: 1rem 0 .22rem; }
.side-panel p, .share-list { color: var(--quiet); font-size: .91rem; overflow-wrap: anywhere; }
.share-list { list-style: none; padding: 0; }
.share-list li { margin: .55rem 0; }
.revoke { padding: .2rem 0; border: 0; background: transparent; color: var(--primary); font-size: .83rem; text-decoration: underline; text-underline-offset: .15em; }
.revoke:hover { color: #792f24; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1.5rem; padding: 1.25rem 0; font-size: .9rem; }
.pagination span { color: var(--quiet); }
.share-section { border-top: 1px solid var(--rule); margin-top: 1rem; }
.share-section > h3 { font-size: 1.05rem; letter-spacing: -.025em; }
.share-form { margin-top: .9rem; }
.share-form .button { margin-top: .3rem; }
.error-page { max-width: 36rem; margin: clamp(1rem,8vw,7rem) auto; }
.error-code { margin-top: 1.25rem; font-family: var(--mono); font-size: .86rem; color: var(--quiet); }
.error-page h1 { margin-top: .5rem; }

@media (min-width: 1650px) {
  .cover { padding-left: max(5rem,calc((100vw - 83rem)/4)); padding-right: max(5rem,calc((100vw - 83rem)/4)); }
}
@media (max-width: 760px) {
  .login-layout { display: block; }
  .cover { min-height: 0; padding: 1.15rem clamp(1.3rem,6vw,3rem); }
  .cover-content, .cover-footer { display: none; }
  .login-main { min-height: calc(100svh - 4.1rem); padding: 2.4rem 1.35rem 3.5rem; }
  .login-panel h1 { font-size: 2.75rem; }
  .conversation-grid { grid-template-columns: minmax(0,1fr); }
  .detail-head { display: block; }
  .side-panel { order: 2; }
  .account { gap: .6rem; }
  .account-email { max-width: 12rem; }
  .list-header, .handle-row { grid-template-columns: minmax(0,1fr) auto; gap: .35rem 1rem; }
  .list-header > :last-child { display: none; }
  .last-time { grid-column: 1 / -1; margin-left: 3.7rem; font-size: .82rem; }
}
@media (max-width: 480px) {
  .account-email { display: none; }
  .app-header-in { min-height: 4.2rem; }
  .handle-row, .list-header { padding-left: .3rem; padding-right: .3rem; }
  .handle-primary { gap: .55rem; }
  .handle-tile { width: 2rem; height: 2.3rem; }
  .subject-preview { display: none; }
  .last-time { margin-left: 2.55rem; }
  .access { font-size: .8rem; gap: .25rem; }
}
