/* SavMail — look of the app. Same arrangement of the other apps of SavOffice (they belong together); colours come from
   the SavComponents tokens with its own primary: the deep ochre of an old envelope, and the yellow of the suite. The mail
   (.mail) fills the window: the folders, the list and the message side by side; on phones one at a time. */
@font-face { font-family: "Stack Sans Notch"; src: url(../../assets/fonts/stack-sans-notch.ttf); font-display: swap; }
@font-face { font-family: Inter; src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; src: url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root, .sav-theme-light { --sav-color-primary: #8f6500; --sav-color-on-primary: #fff; --sav-color-bg: #faf7ee; --sav-color-surface: #fff; --sav-color-surface-2: #f3edde; --sav-color-text: #26200f; --sav-color-text-muted: #756a4e; --sav-color-border: #ebe3cf; --sav-indicator-l: .5; --sav-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --sun: #ffd166; --sun-ink: #5b3f00; --unread: #8f6500; --row-hover: #f6f1e4; --row-active: #f1e6c8; --paper-edge: #e7dfca; }
.sav-theme-dark { --sav-color-primary: #e9bf5c; --sav-color-on-primary: #2a1d00; --sav-color-bg: #15130d; --sav-color-surface: #1f1b12; --sav-color-surface-2: #2a251a; --sav-color-text: #f3eddd; --sav-color-text-muted: #b9ac8b; --sav-color-border: #3a3324; --sav-color-input-bg: #1a170f; --sun: #f5c451; --sun-ink: #2a1d00; --unread: #e9bf5c; --row-hover: #262116; --row-active: #3a311c; --paper-edge: #3a3324; }
@media (prefers-color-scheme: dark) { .sav-theme-auto { --sav-color-primary: #e9bf5c; --sav-color-on-primary: #2a1d00; --sav-color-bg: #15130d; --sav-color-surface: #1f1b12; --sav-color-surface-2: #2a251a; --sav-color-text: #f3eddd; --sav-color-text-muted: #b9ac8b; --sav-color-border: #3a3324; --sav-color-input-bg: #1a170f; --sun: #f5c451; --sun-ink: #2a1d00; --unread: #e9bf5c; --row-hover: #262116; --row-active: #3a311c; --paper-edge: #3a3324; } }
*, ::before, ::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; background: var(--sav-color-bg); color: var(--sav-color-text); font: 400 15px/1.5 var(--sav-font); -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: color-mix(in oklab, var(--sav-color-primary) 85%, var(--sav-color-text)); }
:focus-visible { outline: 2px solid var(--sav-color-focus); outline-offset: 2px; }
/* these SavComponents draw their own focus ring inside: a second outline around them made two loose lines across menus */
sav-menu-item:focus-visible, sav-tree-item:focus-visible, sav-radio:focus-visible { outline: none; }
kbd { font: 500 .74rem/1 var(--sav-font); color: var(--sav-color-text-muted); }
.muted { color: var(--sav-color-text-muted); } .small { font-size: .82rem; } .hint { font-size: .8rem; } .center { text-align: center; } .grow { flex: 1; min-width: 0; } .spacer { flex: 1; }
.stack { display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr); } .form { display: grid; gap: .95rem; grid-template-columns: minmax(0, 1fr); }
.prow { display: flex; align-items: center; gap: .5rem; min-width: 0; } .prow.wrap { flex-wrap: wrap; } .prow.end { align-items: flex-end; } .prow0 { display: flex; align-items: center; } .prow > sav-number-input, .prow > sav-select, .prow > .cf { flex: 1; min-width: 0; }
.grid2 { display: grid; gap: .9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3 { display: grid; gap: .9rem; grid-template-columns: repeat(3, minmax(0, 1fr)); } .w9 { width: 10.5rem; }
.flabel { font-size: .76rem; color: var(--sav-color-text-muted); display: block; margin-bottom: .2rem; }
.wait { min-height: 60dvh; display: grid; place-items: center; padding: 1rem; }
sav-dialog h3 { font-size: .98rem; } .dlg-err { margin-top: .8rem; } .segm.wide { display: block; } .ctxm { position: fixed; z-index: 70; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .8rem; }

/* first page, as in SavPresentations: bar, title and a fan of pages, six features */
.landing, .authp { min-height: 100dvh; display: flex; flex-direction: column; }
.ltop { display: flex; align-items: center; gap: .6rem; padding: 1rem clamp(1rem, 4vw, 3rem); padding-top: max(1rem, env(safe-area-inset-top)); } .ltop .spacer { flex: 1; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.18rem; letter-spacing: -.015em; color: inherit; text-decoration: none; } .brand b { font-weight: 700; } .brand img { border-radius: 9px; }
.lmain { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem); }
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding: clamp(1.5rem, 6vh, 5rem) 0 5rem; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 700; text-wrap: balance; }
.hero-t > p { margin: 1.2rem 0 1.6rem; font-size: 1.12rem; color: var(--sav-color-text-muted); max-width: 34rem; text-wrap: pretty; } .hero-t small { display: block; margin-top: 1rem; color: var(--sav-color-text-muted); }
/* the pages go down to the right: the upper part of each one (its title) is what shows above the next */
.l-stage { position: relative; aspect-ratio: 1 / .94; }
.l-card { position: absolute; width: 42%; aspect-ratio: 3 / 4; left: calc(2% + var(--i) * 9.4%); top: calc(1% + var(--i) * 5.2%); border-radius: 6px; background: #fff; box-shadow: 0 14px 40px rgb(80 40 10 / .2); will-change: transform, opacity; backface-visibility: hidden; pointer-events: none; }
.l-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 34px 80px rgb(80 40 10 / .34); opacity: var(--lift, 0); }
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2rem 2.5rem; padding: 2rem 0 3rem; border-top: 1px solid var(--sav-color-border); }
.feat sav-icon { font-size: 1.5rem; color: var(--sav-color-primary); } .feat h3 { margin: .5rem 0 .2rem; font-size: 1.05rem; } .feat p { color: var(--sav-color-text-muted); }
.amain { flex: 1; display: grid; place-items: center; padding: 1rem; } .aw { width: min(26rem, 100%); } .auth { --sav-card-padding: 1.8rem; display: block; }
.gbox { display: grid; justify-content: center; min-height: 44px; } .auth .idl-savbtn, .auth .idl-sav { margin-top: 0; }
.landing > .credit, .authp > .credit { width: 100%; max-width: 1680px; margin: auto auto 0; padding: 1rem clamp(1rem, 4vw, 3rem); }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); padding-bottom: 3rem; } .l-stage { max-width: 34rem; width: 100%; justify-self: center; } }
.credit { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; align-items: center; padding: 1.1rem 0; color: var(--sav-color-text-muted); font-size: .85rem; margin-top: auto; } .credit a { color: inherit; } .sig { font-family: "Stack Sans Notch", sans-serif; }
/* home: as in SavPresentations (header, side menu with folders and space, quick start card, cards), with the pages of Documents */
.home { min-height: 100dvh; display: flex; flex-direction: column; }
.htop { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .7rem clamp(.8rem, 2vw, 1.6rem); padding-top: max(.7rem, env(safe-area-inset-top)); background: color-mix(in oklab, var(--sav-color-bg) 88%, transparent); backdrop-filter: blur(10px); }
.hsearch { flex: 0 1 30rem; } .htop .hsearch + .spacer { flex: 1; }
.hbody { flex: 1; display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.6rem; width: 100%; max-width: 1680px; margin: 0 auto; padding: .6rem clamp(.8rem, 2vw, 1.6rem) 2rem; align-content: start; }
.hside { display: flex; flex-direction: column; gap: .15rem; align-self: start; position: sticky; top: 4.6rem; }
.newbtn { margin-bottom: .8rem; }
.navh { display: flex; align-items: center; justify-content: space-between; padding: .9rem .2rem .2rem .8rem; font-size: .8rem; font-weight: 600; color: var(--sav-color-text-muted); }
.hmain { min-width: 0; } .hmain h2 { font-size: 1rem; margin: 1.4rem 0 .7rem; }
.hhead { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; } .hhead h1 { font-size: 1.5rem; letter-spacing: -.025em; } .hhead .spacer { flex: 1; }
.home > .credit { width: 100%; max-width: 1680px; margin: auto auto 0; padding: 1rem clamp(.8rem, 2vw, 1.6rem); }
/* settings */
.smain { width: 100%; max-width: 1080px; margin: 0 auto; padding: 1rem clamp(.8rem, 3vw, 2rem) 2rem; } .shd { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; flex-wrap: wrap; } .shd h1 { font-size: 1.5rem; letter-spacing: -.025em; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.4rem; } .steps li { display: flex; gap: .9rem; align-items: start; } .steps li > div { display: grid; gap: .15rem; }
.num { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--sun); color: var(--sun-ink); }
.feat sav-icon { color: var(--sav-color-primary); }
/* settings: sections on the side, rows "what it is | control" (as in SavPresentations) */
.otabs { margin-top: 1rem; --sav-tab-vertical-rail: transparent; } .otabs[placement="start"] { min-height: 60vh; }
.osec { display: grid; gap: .5rem; max-width: 46rem; } .osec h2 { font-size: 1.25rem; letter-spacing: -.015em; margin: 0; } .osec > .muted { margin: 0 0 .4rem; }
.ocard { --sav-card-padding: 0; margin: 0; } .orows { display: grid; }
.orow { display: flex; align-items: center; gap: 1rem 1.6rem; padding: .95rem 1.2rem; border-bottom: 1px solid var(--sav-color-border); } .orow:last-child { border-bottom: 0; }
.orow-t { flex: 1; min-width: 0; display: grid; gap: .15rem; } .orow-t small { color: var(--sav-color-text-muted); font-size: .84rem; } .orow-c { flex: none; max-width: 55%; display: flex; justify-content: flex-end; } .orow-c > sav-select, .orow-c > sav-input { width: 15rem; max-width: 100%; }
@media (max-width: 700px) { .orow { flex-wrap: wrap; } .orow-c { max-width: 100%; width: 100%; justify-content: flex-start; } .orow-c > sav-select, .orow-c > sav-input { width: 100%; } }

/* first page on phones: the top bar fits (the language as an icon), the features close together, nothing moves on touch */
@media (max-width: 600px) {
  .ltop { gap: .3rem; padding-left: 1rem; padding-right: 1rem; }
  .langb .lbl { display: none; }
  .hero { gap: 1.4rem; padding-top: 1.2rem; padding-bottom: 2rem; }
  .hero-t > p { margin: .9rem 0 1.2rem; font-size: 1.02rem; }
  .hero-t .prow sav-button, .hero-t .row sav-button { flex: 1 1 auto; }
  .feats { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; padding: 1.4rem 0 2rem; }
  .feat { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); column-gap: .7rem; align-items: start; }
  .feat sav-icon { grid-row: span 2; font-size: 1.35rem; margin-top: .1rem; }
  .feat h3 { margin: 0 0 .1rem; font-size: 1rem; }
  .feat p { font-size: .92rem; }
  .landing > .credit, .authp > .credit { padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 360px) { .ltop .brand span, .ltop .brand b { display: none; } }
.kicker { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: 1rem; padding: .25rem .7rem; border-radius: 999px; background: color-mix(in oklab, var(--sav-color-primary) 11%, transparent); color: var(--sav-color-primary); font-size: .82rem; font-weight: 600; }
/* the version in the footer and the page of the changes (the same in every Sav app) */
.credit .vlink { font-variant-numeric: tabular-nums; text-decoration: none; padding: .05rem .5rem; border-radius: 99px; border: 1px solid var(--sav-color-border); }
.credit .vlink:hover { border-color: currentColor; }
.chlog .vlist { display: grid; gap: 1rem; margin-top: 1.2rem; max-width: 46rem; }
.vcard { background: var(--sav-color-surface); border: 1px solid var(--sav-color-border); border-radius: 16px; padding: 1rem 1.2rem 1.1rem; }
.vhead { display: flex; align-items: center; gap: .6rem; } .vhead .grow { flex: 1; } .vhead time { color: var(--sav-color-text-muted); font-size: .85rem; }
.vnow { color: var(--sav-color-primary); font-weight: 600; }
.vcard ul { margin: .75rem 0 0; padding-left: 1.2rem; display: grid; gap: .4rem; } .vcard li { line-height: 1.45; }
/* ------------------------------------------------------------------ first page: the small sheets of the fan */
.l-card { overflow: hidden; }
.lp-svg { position: absolute; inset: 0; background: #fff; } .lp-svg svg { display: block; width: 100%; height: 100%; }
/* first page: "How it works" with room above the footer, the language choice as wide as it needs (as SavSchedules) */
.how { padding: 1rem 0 3.5rem; } .how h2 { font-size: 1.4rem; letter-spacing: -.02em; margin-bottom: 1.2rem; }
.langs { width: max-content; max-width: 100%; }
.umenu { display: flex; align-items: center; gap: .3rem; } .umenu sav-avatar { --size: 30px !important; }

/* ------------------------------------------------------------------ the vault: first mailbox, unlocking */
.vmain { width: 100%; max-width: 1180px; margin: 0 auto; padding: 1rem clamp(.8rem, 3vw, 2rem) 2.5rem; }
.vgrid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.4rem, 4vw, 3.5rem); align-items: start; padding-top: clamp(.5rem, 4vh, 2.5rem); }
.vintro h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -.04em; margin-bottom: .9rem; text-wrap: balance; } .vintro > p { font-size: 1.05rem; max-width: 32rem; }
.vpoints { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 1rem; } .vpoints li { display: flex; gap: .8rem; align-items: start; } .vpoints sav-icon { color: var(--sav-color-primary); font-size: 1.2rem; margin-top: .15rem; flex: none; } .vpoints li div { display: grid; gap: .1rem; }
.vcard2 { --sav-card-padding: 1.4rem; display: block; }
.mbform { gap: .85rem; }
.ptiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .45rem; }
.ptile { --sav-radius-lg: 12px; } .ptile::part(body) { display: grid; justify-items: center; gap: .3rem; padding: .55rem .2rem .45rem; }
.plogo { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px; background: var(--c); color: #fff; font-weight: 800; font-size: 1rem; }
.plogo.other { background: var(--sav-color-surface-2); color: var(--sav-color-text); }
.pname { font-size: .7rem; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pinfo:empty { display: none; } .pinfo { display: grid; gap: .5rem; } .pinfo sav-alert a { font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; margin-top: .3rem; }
.srv { border: 1px solid var(--sav-color-border); border-radius: 12px; padding: .6rem .8rem .8rem; margin: 0; display: grid; gap: .55rem; } .srv legend { font-size: .8rem; font-weight: 600; padding: 0 .3rem; color: var(--sav-color-text-muted); }
.srvrow { display: grid; grid-template-columns: minmax(0, 1fr) 5rem 8.5rem; gap: .5rem; }
.cerr code.srv, code.srv { display: block; margin-top: .35rem; font-size: .76rem; padding: .35rem .5rem; border-radius: 6px; background: rgb(0 0 0 / .06); white-space: pre-wrap; word-break: break-word; border: 0; }
.safe { display: flex; gap: .35rem; align-items: start; margin: 0; } .safe sav-icon { flex: none; margin-top: .15rem; color: var(--sav-color-primary); }
.ucenter { display: grid; place-items: center; min-height: 62dvh; } .unl { width: min(27rem, 100%); } .unl h1 { font-size: 1.35rem; letter-spacing: -.02em; }
.ulock { width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--sav-color-primary) 14%, transparent); color: var(--sav-color-primary); font-size: 1.4rem; }
@media (max-width: 900px) { .vgrid { grid-template-columns: minmax(0, 1fr); } .vpoints { display: none; } }
@media (max-width: 560px) { .ptiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .srvrow { grid-template-columns: minmax(0, 1fr) 4.5rem; } .srvrow sav-select { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ the frame (as SavNewsletters): bar, side menu, page */
.hhead { display: flex; align-items: flex-start; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.2rem; } .hhead h1 { font-size: 1.5rem; letter-spacing: -.025em; margin: 0 0 .2rem; } .hhead p { max-width: 40rem; }
.hmain { min-width: 0; display: grid; align-content: start; grid-template-columns: minmax(0, 1fr); }
.hside { min-width: 0; } .hside sav-menu-item { min-width: 0; } .mlab { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hside sav-menu-item[current] { font-weight: 650; }
.gdot { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 7px; flex: none; background: var(--g, var(--sav-color-primary)); color: #fff; font-size: .72rem; font-weight: 700; }
.gdot.small { width: .62rem; height: .62rem; border-radius: 50%; font-size: 0; } .gdot.big { width: 3rem; height: 3rem; border-radius: 14px; font-size: 1.3rem; }
.alabel { display: flex; align-items: center; gap: .45rem; text-transform: none; letter-spacing: 0; overflow: hidden; } .alabel span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aerr { color: var(--sav-color-danger, #b3261e); }
.mmenu { display: none; }
.hsearch { flex: 0 1 34rem; min-width: 0; } .msearch { width: 100%; }
/* the mail fills the window: the page does not scroll, its panes do */
.home.app.fixed { position: fixed; inset: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.home.app.fixed .htop { position: static; }
.home.app.fixed .hbody { min-height: 0; padding-bottom: .8rem; align-content: stretch; grid-template-rows: minmax(0, 1fr); }
.home.app.fixed .hside { position: static; align-self: stretch; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-bottom: 1rem; }
.hmain.fixed { min-height: 0; height: 100%; align-content: stretch; grid-template-rows: minmax(0, 1fr); }
.mail { display: grid; grid-template-columns: minmax(19rem, 25rem) minmax(0, 1fr); min-height: 0; height: 100%; }
.addr .agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.acard { --sav-card-padding: 1.1rem 1.1rem .8rem; display: block; } .ahead { display: flex; gap: .8rem; align-items: center; } .ahead .grow { display: grid; min-width: 0; }
.aemail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.astat { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin: .9rem 0 .7rem; font-size: .86rem; color: var(--sav-color-text-muted); } .astat.ok sav-icon { color: #2f8a4c; } .astat.bad { color: var(--sav-color-danger, #b3261e); } .astat code.srv { flex-basis: 100%; margin: 0; }
.aact { display: flex; align-items: center; gap: .2rem; border-top: 1px solid var(--sav-color-border); padding-top: .6rem; }
.asafe { max-width: 46rem; } .asafe a { display: inline-block; margin-top: .35rem; font-weight: 600; }
.welcome { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.4rem, 4vw, 3rem); align-items: start; padding-top: .5rem; } .fh { font-size: 1.05rem; margin-bottom: .9rem; }
.welcome .vintro h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.05; letter-spacing: -.035em; margin-bottom: .8rem; }
@media (max-width: 1100px) { .welcome { grid-template-columns: minmax(0, 1fr); } .welcome .vpoints { display: none; } }
/* the list */
.mlist { display: flex; flex-direction: column; min-height: 0; background: var(--sav-color-surface); border: 1px solid var(--sav-color-border); border-radius: 16px 0 0 16px; border-right: 0; overflow: hidden; }
.mlhead { border-bottom: 1px solid var(--sav-color-border); }
.lbar { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem .55rem .9rem; min-height: 3.3rem; }
.lttl { display: grid; min-width: 0; } .lttl h1 { font-size: 1.05rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lcount { font-size: .76rem; }
.bulk { display: flex; align-items: center; gap: .05rem; } .mail.selecting .lttl { display: none; }
.mrows { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; outline: none; }
.mrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .62rem .5rem .62rem .85rem; border-bottom: 1px solid color-mix(in oklab, var(--sav-color-border) 70%, transparent); cursor: pointer; position: relative; outline: none; }
[data-density="compact"] .mrow { padding-top: .38rem; padding-bottom: .38rem; } [data-density="compact"] .rpick sav-avatar { --size: 26px !important; width: 26px; height: 26px; }
.mrow:hover { background: var(--row-hover); } .mrow.active { background: var(--row-active); } .mrow.sel { background: color-mix(in oklab, var(--sav-color-primary) 10%, var(--sav-color-surface)); }
.mrow:focus-visible { box-shadow: inset 0 0 0 2px var(--sav-color-focus); }
.mrow.unread::before { content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--unread); }
.rpick { position: relative; width: 34px; height: 34px; display: grid; place-items: center; }
.rpick .rsel { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; background: none; }
.mrow:hover .rsel, .mrow.sel .rsel, .mail.selecting .rsel { opacity: 1; } .mrow:hover sav-avatar, .mrow.sel sav-avatar, .mail.selecting .mrow sav-avatar { visibility: hidden; }
.rbody { min-width: 0; display: grid; gap: .1rem; }
.rl1, .rl2 { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.rfrom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; } .rsubj { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; color: var(--sav-color-text-muted); }
.mrow.unread .rfrom { font-weight: 700; } .mrow.unread .rsubj { color: var(--sav-color-text); font-weight: 600; }
.rdate { flex: none; font-size: .76rem; color: var(--sav-color-text-muted); font-variant-numeric: tabular-nums; } .mrow.unread .rdate { color: var(--unread); font-weight: 650; }
.ratt, .rans { flex: none; font-size: .85rem; color: var(--sav-color-text-muted); } .rdraft { flex: none; font-size: .7rem; font-weight: 700; color: var(--sav-color-danger, #b3261e); text-transform: uppercase; letter-spacing: .04em; }
.rstar { opacity: 0; --sav-button-height: 1.9rem; } .mrow:hover .rstar, .rstar.on, .rstar:focus-visible { opacity: 1; } .rstar.on sav-icon { color: #d49b00; }
.mmore { display: grid; place-items: center; padding: .8rem; } .msent { height: 1px; }
.skel { display: grid; } .srow { display: flex; gap: .8rem; align-items: center; padding: .8rem .9rem; border-bottom: 1px solid var(--sav-color-border); }
.mrows sav-empty-state { margin-top: 3rem; }
/* the message */
.mread { min-height: 0; background: var(--sav-color-surface); border: 1px solid var(--sav-color-border); border-radius: 0 16px 16px 0; overflow: hidden; display: flex; flex-direction: column; }
.rempty, .rload { flex: 1; display: grid; place-items: center; padding: 2rem; color: var(--sav-color-text-muted); }
.reader { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.rtool { display: flex; align-items: center; gap: .1rem; padding: .45rem .6rem; border-bottom: 1px solid var(--sav-color-border); min-height: 3.3rem; overflow-x: auto; scrollbar-width: none; } .rtool::-webkit-scrollbar { display: none; }
.rback { display: none; }
.tsep { width: 1px; height: 1.4rem; background: var(--sav-color-border); margin: 0 .3rem; flex: none; }
.rscroll { flex: 1; min-height: 0; overflow-y: auto; padding: 1.2rem clamp(1rem, 2.5vw, 2rem) 2rem; overscroll-behavior: contain; }
.rtitle { font-size: 1.4rem; line-height: 1.25; letter-spacing: -.02em; margin-bottom: 1rem; overflow-wrap: anywhere; color: var(--sav-color-text); white-space: normal; }
.rhead { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: start; margin-bottom: 1rem; } .rhead .grow { display: grid; gap: .1rem; min-width: min(14rem, 100%); flex: 1; }
.rfromline { overflow-wrap: anywhere; } .rppl { font-size: .84rem; overflow-wrap: anywhere; } .rside { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .3rem .5rem; margin-left: auto; white-space: nowrap; max-width: 100%; } .rside .achip { white-space: nowrap; }
.achip { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; padding: .1rem .55rem; border-radius: 99px; background: color-mix(in oklab, var(--c) 14%, transparent); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.held { margin-bottom: .8rem; } .held .prow { margin-top: .5rem; }
.rpaper { border-radius: 12px; overflow: hidden; border: 1px solid var(--paper-edge); background: #fff; }
.rframe { display: block; width: 100%; height: 240px; border: 0; background: #fff; }
.ratts { margin-top: 1rem; display: grid; gap: .5rem; } .attl { display: flex; flex-wrap: wrap; gap: .5rem; }
.att { display: inline-flex; align-items: stretch; max-width: 100%; border-radius: 10px; border: 1px solid var(--sav-color-border); background: var(--sav-color-surface-2); font-size: .86rem; overflow: hidden; }
.att:hover { border-color: var(--sav-color-primary); }
.attp { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: .45rem; min-width: 0; padding: .45rem .5rem .45rem .7rem; cursor: pointer; }
.attp:hover { background: color-mix(in oklab, var(--sav-color-primary) 8%, transparent); } .attp:focus-visible, .attd:focus-visible { outline: 2px solid var(--sav-color-focus); outline-offset: -2px; }
.attd { display: grid; place-items: center; padding: 0 .6rem; color: var(--sav-color-text-muted); border-left: 1px solid var(--sav-color-border); }
.attd:hover { color: var(--sav-color-primary); background: color-mix(in oklab, var(--sav-color-primary) 8%, transparent); }
.attn { min-width: 0; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .attp small { color: var(--sav-color-text-muted); }
/* the preview of an attachment (as in SavDrive) */
.pv { --sav-dialog-padding: .8rem; }
.pvwrap { position: relative; display: grid; place-items: center; min-height: 50vh; background: var(--sav-color-surface-2); border-radius: 14px; overflow: hidden; }
.pvstage { width: 100%; display: grid; place-items: center; }
.pvimg { max-width: 100%; max-height: 72vh; display: block; object-fit: contain; }
.pvpdf { width: 100%; height: 72vh; border: 0; background: #fff; display: block; }
.pvvid { width: 100%; max-height: 72vh; display: block; background: #000; }
.pvaud { display: grid; gap: 1.2rem; justify-items: center; width: min(32rem, 100%); padding: 2rem 1rem; } .pvaud > sav-icon { font-size: 4rem; color: var(--sav-color-primary); } .pvaud audio { width: 100%; }
.pvtext { width: 100%; max-height: 72vh; overflow: auto; margin: 0; padding: 1rem 1.2rem; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--sav-color-surface); text-align: left; align-self: stretch; }
.pvnone { display: grid; gap: .6rem; justify-items: center; text-align: center; padding: 3rem 1rem; max-width: 28rem; } .pvnone b { overflow-wrap: anywhere; }
.tic.big { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 18px; background: var(--sav-color-surface); color: var(--sav-color-primary); font-size: 2rem; }
.pvnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; } .pvnav.l { left: .5rem; } .pvnav.r { right: .5rem; } .pvnav sav-button { background: color-mix(in oklab, var(--sav-color-surface) 85%, transparent); border-radius: 50%; }
.pvinfo { display: flex; align-items: center; gap: .5rem; padding-top: .8rem; flex-wrap: wrap; }
.unsub { margin-top: 1rem; display: flex; align-items: center; gap: .3rem; } .rquick { display: flex; gap: .5rem; margin-top: 1.4rem; flex-wrap: wrap; }
.mfab { display: none; }
.mfab { display: none; }
/* tablets and phones: the menu in a drawer from the bar */
@media (max-width: 900px) {
  .hbody > .hside { display: none; } .hbody { grid-template-columns: minmax(0, 1fr); } .home.app.noside .mmenu { display: none; }
  /* the folders are in the bar at the bottom (SavOffice.bottomNav): the page that fills the window ends above it */
  body:has(.so-bnav) .home.app.fixed { bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
  /* the bar on top, as in every app of SavOffice: logo and name on the left, the apps and the account on the right; the search
     on a row of its own, as wide as the page */
  .htop { flex-wrap: wrap; row-gap: .6rem; } .htop > .hsearch { order: 3; flex: 1 0 100%; margin: 0; } .htop > .hsearch .msearch { width: 100%; }
  /* the button to write floats above the bar at the bottom */
  body:has(.so-bnav) .mfab { bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
  .mdrawer .newbtn { margin-bottom: .8rem; }
  .mfab { display: inline-flex; position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 30; --sav-button-height: 3.4rem; box-shadow: 0 8px 24px rgb(0 0 0 / .2); border-radius: 18px; }
  .mail[data-pane="read"] .mfab { display: none; }
}
@media (max-width: 1020px) and (min-width: 761px) { .mail { grid-template-columns: minmax(16rem, 21rem) minmax(0, 1fr); } }
/* phones: one pane at a time */
@media (max-width: 760px) {
  .home.app.fixed .hbody { padding: 0; }
  .mail { grid-template-columns: minmax(0, 1fr); }
  .mlist, .mread { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
  .mail[data-pane="list"] .mread, .mail[data-pane="read"] .mlist { display: none; }
  .home.app.fixed:has(.mail[data-pane="read"]) .htop { display: none; }
  .rback { display: inline-flex; } .rtool { padding-top: max(.45rem, env(safe-area-inset-top)); }
  .rscroll { padding: 1rem .8rem 2rem; } .rtitle { font-size: 1.2rem; } .rside { max-width: 45%; }
  .rpick .rsel { display: none; } .mail.selecting .rpick .rsel { display: grid; }
  .rstar { opacity: 1; } .rstar:not(.on) { display: none; }
  .htop { gap: .3rem; }
}

/* ------------------------------------------------------------------ writing */
.compose::part(body) { padding-top: .2rem; }
.cform { display: grid; gap: .55rem; grid-template-columns: minmax(0, 1fr); }
.crow { display: flex; gap: .4rem; align-items: end; } .crow .addr { flex: 1; min-width: 0; } .ccbtn { flex: none; margin-bottom: .1rem; }
.cbar { display: flex; align-items: center; gap: .05rem; padding: .2rem; border: 1px solid var(--sav-color-border); border-radius: 10px 10px 0 0; border-bottom: 0; margin-bottom: -.55rem; background: var(--sav-color-surface-2); flex-wrap: wrap; }
.editor { min-height: 14rem; max-height: 50dvh; overflow-y: auto; padding: .8rem .9rem; border: 1px solid var(--sav-color-border); border-radius: 0 0 10px 10px; background: var(--sav-color-input-bg, var(--sav-color-surface)); outline: none; line-height: 1.55; overflow-wrap: anywhere; }
.editor:focus { border-color: var(--sav-color-primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--sav-color-primary) 18%, transparent); }
.editor.drop { border-style: dashed; border-color: var(--sav-color-primary); } .editor p { margin: 0 0 .5em; } .editor img { max-width: 100%; height: auto; }
.editor blockquote { margin: .5em 0 .5em .2em; padding-left: .9em; border-left: 3px solid var(--sav-color-border); color: var(--sav-color-text-muted); }
.editor .ml-quote { color: var(--sav-color-text-muted); font-size: .94em; } .editor .plain { white-space: pre-wrap; } .editor .ml-sig { color: var(--sav-color-text-muted); }
.editor.sig { min-height: 5rem; border-radius: 10px; }
.catts { display: flex; flex-wrap: wrap; gap: .4rem; } .catts:empty { display: none; } .catts sav-alert { flex-basis: 100%; }
.cfile { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .2rem .15rem .55rem; border-radius: 99px; background: var(--sav-color-surface-2); font-size: .82rem; max-width: 100%; }
.cfile span { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cfile small { color: var(--sav-color-text-muted); }
@media (max-width: 640px) { .editor { min-height: 40dvh; max-height: none; } }

/* ------------------------------------------------------------------ settings */
.osub { font-size: .95rem; margin: .9rem 0 .2rem; } .mbrow .adot { margin-right: .2rem; }
.sws { display: flex; gap: .45rem; flex-wrap: wrap; } .swb { all: unset; cursor: pointer; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); }
.swb.on { box-shadow: 0 0 0 2px var(--sav-color-surface), 0 0 0 4px var(--c); } .swb:focus-visible { outline: 2px solid var(--sav-color-focus); outline-offset: 3px; }
.rcode { font: 700 1.25rem/1.4 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .06em; text-align: center; padding: .9rem; border-radius: 12px; background: var(--sav-color-surface-2); user-select: all; word-break: break-all; }
.osec > sav-alert { margin-bottom: .4rem; }

/* ------------------------------------------------------------------ adding an address: three steps */
.wizard { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); }
.wsteps { margin-bottom: .2rem; }
.wpane { display: grid; gap: .9rem; grid-template-columns: minmax(0, 1fr); }
.wh { font-size: 1.05rem; margin: 0; } .wpane > .muted.small { margin-top: -.6rem; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: .6rem; }
.pcard { --sav-radius-lg: 14px; } .pcard::part(body) { display: flex; align-items: center; gap: .75rem; padding: .75rem .85rem; }
.pct { display: grid; min-width: 0; } .pct b { font-size: .95rem; } .pct small { color: var(--sav-color-text-muted); font-size: .76rem; line-height: 1.3; }
.pcard[data-p="custom"] { grid-column: 1 / -1; }
.plogo.big { width: 2.5rem; height: 2.5rem; border-radius: 11px; font-size: 1.15rem; flex: none; }
.pchosen { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem .5rem .55rem; border-radius: 12px; background: var(--sav-color-surface-2); }
.pchosen .plogo { width: 1.8rem; height: 1.8rem; border-radius: 8px; font-size: .9rem; }
.wnav { display: flex; align-items: center; gap: .5rem; padding-top: .2rem; }
.editor.sig:empty::before { content: attr(data-placeholder); color: var(--sav-color-text-muted); pointer-events: none; }
@media (max-width: 560px) { .pgrid { grid-template-columns: minmax(0, 1fr); } .wnav { flex-wrap: wrap-reverse; } .wnav sav-button[variant="primary"] { flex: 1 1 auto; } }

/* the side menu: each address closes and opens; its other folders as a tree */
.hside sav-menu-item > sav-icon[slot="prefix"], .hside sav-menu-item > .gdot { flex: none; }
.mlab { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ablock { margin-top: .5rem; }
.ahd { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .5rem; width: 100%; padding: .45rem .7rem; border-radius: 10px; cursor: pointer; font-size: .8rem; font-weight: 650; color: var(--sav-color-text-muted); }
.ahd:hover { background: var(--sav-color-surface-2); } .ahd:focus-visible { outline: 2px solid var(--sav-color-focus); outline-offset: -2px; }
.aem { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.achev { flex: none; font-size: .95rem; transition: transform .18s; } .ahd.closed .achev { transform: rotate(-90deg); }
.abadge { flex: none; } .ahd .aerr { flex: none; color: var(--sav-color-danger, #b3261e); }
.atree { margin: .1rem 0 0; } .atree::part(base) { padding: 0 .25rem; }
@media (prefers-reduced-motion: reduce) { .achev { transition: none; } }
.lrefresh, .lfilter { flex: none; } .mail.selecting .lrefresh, .mail.selecting .lbar > sav-dropdown:has(.lfilter) { display: none; }
.lrefresh sav-icon { display: block; transform-origin: 50% 50%; }
.lrefresh.spin { pointer-events: none; } .lrefresh.spin sav-icon { animation: lspin .8s linear infinite; color: var(--sav-color-primary); }
@keyframes lspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lrefresh.spin sav-icon { animation-duration: 2.4s; } }



/* the side menu folds into a column of icons (as the collapsible vertical tabs of SavComponents): a round handle on its
   edge, the names in a tip on hover or focus, a dot where something is unread */
.home.app .hbody { --sidew: 15rem; position: relative; grid-template-columns: var(--sidew) minmax(0, 1fr); transition: grid-template-columns .28s var(--sav-easing, ease); }
.home.app.side-mini .hbody { --sidew: 3.4rem; }
.sfold { all: unset; box-sizing: border-box; position: absolute; z-index: 6; top: .25rem; left: calc(clamp(.8rem, 2vw, 1.6rem) + var(--sidew) + .25rem); width: 1.7rem; height: 1.7rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--sav-color-surface); color: var(--sav-color-text-muted); box-shadow: 0 0 0 1px var(--sav-color-border), var(--sav-shadow-sm, 0 1px 3px rgb(0 0 0 / .12)); cursor: pointer;
  transition: left .28s var(--sav-easing, ease), color .15s, transform .15s; }
.sfold:hover { color: var(--sav-color-primary); transform: scale(1.08); } .sfold:focus-visible { outline: 2px solid var(--sav-color-focus); outline-offset: 2px; } .sfold sav-icon { font-size: .95rem; }
.side-mini .hside { align-items: center; overflow-x: hidden; scrollbar-width: none; } .side-mini .hside::-webkit-scrollbar { display: none; }
.side-mini .hside sav-menu { width: 100%; } .side-mini .hside sav-divider { width: 70%; margin-inline: auto; }
/* in the icon column the label (empty) and its gap go away, so each icon sits in the middle */
.side-mini .hside sav-menu-item.mi { position: relative; display: block; width: 100%; }
.side-mini .hside sav-menu-item.mi::part(base) { justify-content: center; gap: 0; box-sizing: border-box; width: 2.6rem; height: 2.5rem; padding: 0; margin: 0 auto; }
.side-mini .hside sav-menu-item.mi::part(label) { display: none; }
.side-mini .hside sav-menu::part(base) { padding-inline: 0; }
.side-mini .newmini { margin: 0 auto .8rem; display: flex; justify-content: center; }
.mdot { position: absolute; top: .35rem; right: .35rem; width: .48rem; height: .48rem; border-radius: 50%; background: var(--sav-color-primary); box-shadow: 0 0 0 2px var(--sav-color-bg); pointer-events: none; }
.ablock.mini { display: grid; justify-items: center; gap: .15rem; margin-top: .6rem; } .ahead-mini { width: 1.5rem; height: 1.5rem; border-radius: 7px; font-size: .72rem; }
.sfold[data-tip]:is(:hover, :focus-visible)::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); z-index: 60; white-space: nowrap; pointer-events: none;
  padding: .35rem .6rem; border-radius: var(--sav-radius-sm, 6px); background: var(--sav-color-tooltip-bg, #222); color: var(--sav-color-tooltip-text, #fff); font: 500 .8rem/1.2 var(--sav-font); box-shadow: var(--sav-shadow, 0 4px 14px rgb(0 0 0 / .2)); }
/* the tip of the folded menu: one element over the page (the column scrolls, so a tip inside it would be cut) */
.mtip { position: fixed; z-index: 80; transform: translateY(-50%); white-space: nowrap; pointer-events: none; padding: .35rem .6rem; border-radius: var(--sav-radius-sm, 6px);
  background: var(--sav-color-tooltip-bg, #222); color: var(--sav-color-tooltip-text, #fff); font: 500 .8rem/1.2 var(--sav-font); box-shadow: var(--sav-shadow, 0 4px 14px rgb(0 0 0 / .2)); }
.ahead-mini { all: unset; box-sizing: border-box; position: relative; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 8px; background: var(--g); color: #fff; font-size: .74rem; font-weight: 700; cursor: pointer; }
.ahead-mini:hover { box-shadow: 0 0 0 3px color-mix(in oklab, var(--g) 30%, transparent); } .ahead-mini:focus-visible { outline: 2px solid var(--sav-color-focus); outline-offset: 2px; }
.ahead-mini.closed { opacity: .85; } .adot-mini { top: -.2rem; right: -.25rem; }
@media (prefers-reduced-motion: reduce) { .home.app .hbody, .sfold { transition: none; } }
@media (max-width: 900px) { .sfold { display: none; } .home.app .hbody, .home.app.side-mini .hbody { grid-template-columns: minmax(0, 1fr); } }

/* the icon of the sender's site fills the avatar (cover), on white for the transparent ones */
sav-avatar.logo::part(image) { background: #fff; object-fit: cover; width: 100%; height: 100%; }
sav-avatar.logo { box-shadow: 0 0 0 1px var(--sav-color-border); border-radius: 50%; }

/* the settings: a page of its own, without the side menu (as in the other apps of SavOffice), centred */
.home.app.noside .hbody { grid-template-columns: minmax(0, 1fr); max-width: 1080px; }
.sett .shd { margin: 0 0 .2rem -.6rem; }
.pvwrap:has(.pvtext) { place-items: stretch; } .pvwrap:has(.pvtext) .pvstage { place-items: stretch; } .pvtext { min-height: 50vh; }
/* a fixed space chosen in the bar of a message (⋮ → Customise the bars) */
.cbar > i.bgap { width: .9rem; flex: none; }
