/* Two authored marketing scenes. Shared app identity; separate desktop/phone compositions. */
.sorting-hero{--sort-border:#dfd7c8;--sort-paper:#faf9f5;--sort-deck:#eeeDE8;--sort-card:#fff;--sort-selection:#edf2f4;--sort-selection-line:#8299a7;position:relative;min-width:0;width:100%;text-align:left;isolation:isolate}
[data-theme=dark] .sorting-hero{--sort-border:#4b443b;--sort-paper:#24211d;--sort-deck:#1c1916;--sort-card:#2d2925;--sort-selection:#393934;--sort-selection-line:#89979e}
.sorting-hero-mobile{display:none}
.sorting-intro{min-height:46px;margin:0;padding:0 3px 12px;font:400 24px/1.25 var(--serif);color:var(--ink);text-align:center}
.sorting-intro em{font-weight:400;color:var(--accent)}
.sorting-arrival-zone{height:164px;position:relative;padding:23px 23px 0}
.sorting-incoming-label{display:flex;align-items:center;gap:8px;font:400 10px/1.5 var(--mono);text-transform:uppercase;color:var(--muted);margin:0 0 12px 18px}
.sorting-incoming-label svg{width:13px;height:13px;color:var(--accent)}
.sorting-arrival-card{position:relative;display:flex;align-items:center;gap:12px;width:350px;max-width:100%;margin-left:auto;padding:16px 18px;background:var(--sort-card);border:1px solid var(--sort-border);border-radius:9px;box-shadow:0 12px 27px -16px #00214750;min-height:82px}
.sorting-arrival-card>div{min-width:0;flex:1}
.sorting-avatar{display:grid;place-items:center;width:34px;height:34px;flex:none;background:var(--sort-selection);border:1px solid var(--sort-border);border-radius:50%;color:var(--accent);font:500 18px/1 var(--serif)}
.sorting-arrival-from{display:block;font:400 11px/1.4 var(--sans);color:var(--muted)}
.sorting-arrival-card p{font:400 14px/1.35 var(--sans);color:var(--ink);margin-top:4px}
.sorting-arrival-preview{display:block;font:400 10px/1.4 var(--sans);color:var(--muted);margin-top:4px}
.sorting-new-dot{width:5px;height:5px;flex:none;background:var(--accent);border-radius:50%;align-self:flex-start;margin-top:6px}
.sorting-arrival-path{position:absolute;left:43%;bottom:1px;display:grid;place-items:center;height:20px;color:var(--accent);opacity:.55}
.sorting-arrival-path svg{height:20px;width:20px}
.sorting-shell{background:var(--sort-paper);border:1px solid var(--sort-border);border-radius:10px;overflow:hidden;box-shadow:0 24px 60px -34px #00214755}
.sorting-deck{display:flex;gap:8px;padding:11px 10px 10px;background:var(--sort-deck);border-bottom:1px solid var(--sort-border);min-width:0;position:relative;z-index:6}
.sorting-desktop-brand{display:flex;align-items:center;justify-content:center;flex:0 0 136px;padding:10px;border:1px solid var(--sort-border);border-radius:10px;background:var(--sort-paper);box-shadow:0 4px 8px #00214708}
.sorting-desktop-brand img{width:100%;height:auto;aspect-ratio:3771/1024;object-fit:contain}
.sorting-desktop-brand .sorting-compact-icon{display:none}
.sorting-tabs{display:flex;gap:8px;flex:1;min-width:0}
.sorting-tab{position:relative;display:flex;align-items:center;justify-content:space-between;gap:9px;flex:1;min-width:0;min-height:72px;padding:11px 13px;background:var(--sort-card);color:var(--ink);border:1px solid var(--sort-border);border-radius:10px;text-align:left;transition:background .3s,border-color .3s,box-shadow .3s}
.sorting-tab>span:first-child{min-width:0}
.sorting-tab-title{display:block;font:500 25px/1.05 var(--serif);white-space:nowrap}
.sorting-tab-description{display:block;font:italic 11px/1.2 Newsreader,Georgia,serif;color:var(--muted);margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sorting-tab-count{display:flex;align-items:center;justify-content:center;align-self:stretch;flex:0 0 30px;padding-left:10px;border-left:1px solid var(--sort-border);font:italic 29px/1 Newsreader,Georgia,serif;color:var(--accent)}
.sorting-tab[aria-selected=true]{background:var(--sort-selection);border-color:var(--sort-selection-line);box-shadow:inset 0 0 0 .5px var(--sort-selection-line)}
.sorting-tab:hover{border-color:var(--sort-selection-line)}
.sorting-tab:focus-visible{outline-offset:-4px}
.sorting-tab.is-receiving{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 18%,transparent),0 6px 20px -8px color-mix(in srgb,var(--accent) 25%,transparent)}
.sorting-mail-panel{min-width:0;padding-bottom:12px}
.sorting-list-header{min-height:75px;padding:17px 21px 12px;display:flex;justify-content:space-between;align-items:end;gap:16px}
.sorting-list-header p{font:400 10px/1.4 var(--sans);color:var(--muted);margin-bottom:5px}
.sorting-list-header h2{font:600 22px/1.2 var(--sans);letter-spacing:-.5px}
.sorting-list-header h2>span{color:var(--accent)}
.sorting-list-caption{font:italic 15px/1.3 Newsreader,Georgia,serif;color:var(--muted);padding-bottom:3px}
.sorting-message-list{padding:0 11px;margin:0;list-style:none;height:190px;overflow:hidden}
.sorting-message{position:relative;display:flex;align-items:center;gap:13px;min-height:77px;padding:13px 15px;border:1px solid transparent;border-radius:8px;margin:0 0 5px}
.sorting-message.is-new{background:var(--sort-card);border-color:var(--sort-border);box-shadow:0 7px 18px -8px #6b1f2e30}
.sorting-message.is-new::before{content:"";position:absolute;left:-1px;top:25px;width:1px;height:27px;background:var(--accent)}
.sorting-row-avatar{display:grid;place-items:center;width:32px;height:32px;flex:none;color:var(--muted);font:500 17px/1 var(--serif)}
.sorting-message>div{min-width:0;flex:1}
.sorting-row-from{display:flex;justify-content:space-between;gap:10px;align-items:baseline;font:400 11px/1.4 var(--sans)}
.sorting-row-from>span{font:400 9px/1.5 var(--mono);color:var(--muted);white-space:nowrap}
.sorting-message p{font:400 14px/1.4 var(--sans);margin:4px 0 0}
.sorting-row-preview{display:block;font:400 11px/1.4 var(--sans);color:var(--muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sorting-row-dot{position:absolute;left:26px;top:19px;width:4px;height:4px;border-radius:50%;background:var(--accent)}
.sorting-flight-layer{position:absolute;inset:0;z-index:5;overflow:hidden;pointer-events:none}
.sorting-flight{position:absolute;margin:0;max-width:none;transform-origin:center;box-shadow:0 14px 30px -10px #00214740}
.app-layout-example{border-block:1px solid var(--line);margin-top:38px}
.app-layout-example>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 0;min-height:78px;cursor:pointer;font:400 16px/1.5 var(--sans)}
.app-layout-example>summary::-webkit-details-marker{display:none}
.app-layout-example>summary>span>span{display:block;font-size:12px;color:var(--muted);margin-top:3px}
.app-layout-example>summary>svg{width:19px;height:19px;color:var(--accent);transition:transform .25s}
.app-layout-example[open]>summary>svg{transform:rotate(45deg)}
.app-layout-example-content{padding:10px 0 30px}
.app-layout-example .hero-app-demo{max-width:900px;margin:auto;animation:none}
html[data-motion=quiet] .sorting-hero{animation:none}
@media(max-width:1190px) and (min-width:901px){.sorting-desktop-brand{flex-basis:70px;padding:7px}.sorting-desktop-brand .logo-light,.sorting-desktop-brand .logo-dark{display:none}.sorting-desktop-brand .sorting-compact-icon{display:block;width:44px;height:44px;aspect-ratio:1}.sorting-deck,.sorting-tabs{gap:6px}.sorting-tab{padding:10px 9px;gap:6px}.sorting-tab-title{font-size:21px}.sorting-tab-count{flex-basis:24px;font-size:25px;padding-left:7px}.sorting-tab-description{font-size:9px}.sorting-list-caption{font-size:13px}.sorting-arrival-card{width:310px}}
@media(max-width:900px){.sorting-hero{max-width:700px;margin:auto}}
@media(max-width:700px),(max-width:950px) and (max-height:520px){
  .sorting-hero-desktop{display:none}.sorting-hero-mobile{display:block;max-width:430px;margin:auto}
  .sorting-hero-mobile .sorting-intro{font-size:22px;padding-bottom:10px}
  .sorting-hero-mobile .sorting-arrival-zone{height:119px;padding:6px 12px 0}
  .sorting-hero-mobile .sorting-incoming-label{font-size:9px;margin:0 0 9px 6px;gap:7px}
  .sorting-hero-mobile .sorting-arrival-card{width:100%;padding:13px 14px;min-height:78px;border-radius:8px;gap:10px}
  .sorting-hero-mobile .sorting-avatar{width:29px;height:29px;font-size:17px}
  .sorting-hero-mobile .sorting-arrival-from{font-size:11px}
  .sorting-hero-mobile .sorting-arrival-card p{font-size:13px;line-height:1.4}
  .sorting-hero-mobile .sorting-arrival-preview{display:none}
  .sorting-hero-mobile .sorting-arrival-path{left:46%;bottom:0;height:23px}
  .sorting-hero-mobile .sorting-desktop-brand{display:none}
  .sorting-hero-mobile .sorting-deck{padding:0 8px 8px;gap:6px}
  .sorting-hero-mobile .sorting-tabs{gap:6px}
  .sorting-hero-mobile .sorting-tab{padding:10px 8px;gap:4px;min-height:65px;border-radius:8px}
  .sorting-hero-mobile .sorting-tab-title{font-size:20px}
  .sorting-hero-mobile .sorting-tab-description{display:none}
  .sorting-hero-mobile .sorting-tab-count{font-size:23px;min-width:18px;padding-left:5px}
  .sorting-hero-mobile .sorting-list-header{padding:15px 16px 11px;min-height:68px}
  .sorting-hero-mobile .sorting-list-header p{font-size:9px}
  .sorting-hero-mobile .sorting-list-header h2{font-size:21px}
  .sorting-hero-mobile .sorting-list-caption{display:none}
  .sorting-hero-mobile .sorting-message-list{padding:0 8px;height:178px}
  .sorting-hero-mobile .sorting-message{padding:12px 10px;gap:7px;min-height:74px}
  .sorting-hero-mobile .sorting-row-avatar{width:24px;font-size:16px}
  .sorting-hero-mobile .sorting-row-from{font-size:11px;gap:6px}
  .sorting-hero-mobile .sorting-row-from>span{font-size:8px}
  .sorting-hero-mobile .sorting-message p{font-size:13px}
  .sorting-hero-mobile .sorting-row-preview{font-size:10px;max-width:100%}
  .sorting-hero-mobile .sorting-row-dot{left:19px;top:18px}
  .app-layout-example>summary{font-size:15px}.app-layout-example>summary>span>span{font-size:11px}
}
@media(max-width:380px){.sorting-hero-mobile .sorting-tab{padding:9px 6px;gap:3px}.sorting-hero-mobile .sorting-tab-title{font-size:18px}.sorting-hero-mobile .sorting-tab-count{font-size:21px;min-width:17px;padding-left:4px}.sorting-hero-mobile .sorting-arrival-zone{padding-inline:7px}.sorting-hero-mobile .sorting-arrival-card{padding:12px;gap:8px}.sorting-hero-mobile .sorting-message{padding-inline:8px;gap:6px}.sorting-hero-mobile .sorting-row-avatar{width:20px}.sorting-hero-mobile .sorting-row-from>span{font-size:7px}}

/* Reserve space before playback; only the mail and list transition, never the scene. */
.sorting-hero[data-phase=waiting] .sorting-arrival-card{visibility:hidden}
.sorting-hero:not([data-phase=complete]):not([data-phase=settled]) .sorting-arrival-card,.sorting-flight{will-change:transform,opacity}
.sorting-hero:not([data-phase=complete]):not([data-phase=settled]) .sorting-mail-panel{will-change:opacity}
@media(max-width:700px){
  .hero-layout{padding:25px 20px 36px;gap:0;align-items:start;justify-items:center}
  .hero-copy{display:contents;animation:none!important}
  .hero h1{order:1;margin:0 auto 16px}
  .hero-description{order:2;margin:0 auto 20px;max-width:335px}
  .sorting-hero-mobile{order:3}
  .hero-actions{order:4;margin:24px 0 0;gap:10px 18px}
  .hero-signoff{order:5;margin-top:15px}
}
@media(min-width:701px) and (max-width:900px) and (min-height:521px){
  .hero-layout{gap:0;padding:36px 32px 48px;justify-items:center}
  .hero-copy{display:contents;animation:none!important}
  .hero h1{order:1;margin:0 auto 20px}
  .hero-description{order:2;margin:0 auto 24px}
  .sorting-hero-desktop{order:3}
  .hero-actions{order:4;margin:28px 0 0}
  .hero-signoff{order:5;margin-top:18px}
}
@media(max-width:700px),(max-width:950px) and (max-height:520px){
  .sorting-hero-mobile .sorting-arrival-zone{height:110px;padding-top:0}
  .sorting-hero-mobile .sorting-arrival-card{min-height:70px;padding-block:11px}
  .sorting-hero-mobile .sorting-arrival-path{bottom:1px;height:10px}
  .sorting-hero-mobile .sorting-arrival-path svg{width:10px;height:10px}
  .sorting-hero-mobile .sorting-tab{min-height:58px;padding-block:8px}
  .sorting-hero-mobile .sorting-tab-count{flex-basis:20px}
  .sorting-hero-mobile .sorting-list-header{min-height:60px;padding:10px 14px 8px}
  .sorting-hero-mobile .sorting-list-header p{margin-bottom:4px}
  .sorting-hero-mobile .sorting-list-header h2{font-size:20px}
  .sorting-hero-mobile .sorting-message-list{height:158px}
  .sorting-hero-mobile .sorting-message{min-height:64px;padding-block:10px}
  .sorting-hero-mobile .sorting-message:not(.is-new) .sorting-row-preview{display:none}
  .sorting-hero-mobile .sorting-mail-panel{padding-bottom:8px}
}
@media(max-width:380px){
  .sorting-hero-mobile .sorting-tab-count{flex-basis:18px}
  .hero-layout{padding:16px 17px 32px}
  .hero h1{font-size:34px;margin-bottom:12px}
  .hero-description{font-size:14px;line-height:1.6;margin-bottom:10px}
  .sorting-hero-mobile .sorting-arrival-zone{height:114px}
}
@media(max-width:950px) and (max-height:520px){
  .sorting-hero-mobile{display:grid;grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);gap:0 18px;max-width:760px}
  .sorting-hero-mobile .sorting-intro{grid-column:1/-1}
  .sorting-hero-mobile .sorting-arrival-zone{grid-column:1;height:130px;align-self:center;padding-inline:0}
  .sorting-hero-mobile .sorting-arrival-path{visibility:hidden}
  .sorting-hero-mobile .sorting-shell{grid-column:2;grid-row:2}
  .sorting-hero-mobile .sorting-message-list{height:150px}
}
