/* Templates tab: LinkedIn simulator, post preview, slide editor, locked source files (on top of site.css + vi.css) */

/* Images carry width/height attributes for layout stability; let CSS size them */
:where(.tpl) img { height: auto; }
/* site.css also has a .mono grid block for the logo page; here .mono is only the typeface */
:where(.tpl) .mono { display: block; margin-top: 0; }
.tpl .main { grid-template-columns: minmax(0, 1fr); }

/* On desktop every section fits one screen: --fit is the height left for a section's stage */
@media (min-width: 981px) {
  .tpl { --fit: max(330px, calc(100svh - 300px)); }
  .tpl .panel:not(.cover) { padding: 28px 40px 32px; }
  .tpl .sec-head { margin-bottom: 20px; }
  .tpl .sec-head h2 { font-size: clamp(26px, 2.4vw, 34px); }
  .tpl .sec-head p { font-size: 14px; max-width: 46ch; }
  .tpl .cover-grid { padding: clamp(16px, 2.5vh, 32px) 0 clamp(20px, 3vh, 40px); }
  .tpl .cover h1 { font-size: clamp(44px, min(5.4vw, 8.5vh), 78px); }
  .tpl .cover { padding-top: clamp(24px, 4vh, 60px); padding-bottom: clamp(24px, 4vh, 60px); }
}
@media (min-width: 981px) and (max-height: 760px) {
  .tpl .cover .lead { margin-top: 16px; font-size: 16px; }
  .tpl .cover-list { margin-top: 16px; }
  .tpl .cover-list li { padding: 8px 0; }
  .tpl .cover-art { aspect-ratio: 16 / 10; }
  .sim-ctl { gap: 10px; }
  .dd-btn { height: 46px; }
  .seg button { height: 32px; }
  .pick { padding: 10px 14px; }
  .post-pick { gap: 14px; }
}
@media (min-width: 981px) and (max-height: 680px) {
  .pick, .pp-how { display: none; }
}

/* Cover */
.tpl-art { display: block; position: relative; background: #fff; padding: 0; overflow: hidden; }
.tpl-art img { position: absolute; box-shadow: 0 18px 30px -18px rgba(20, 35, 30, .45); }
.tpl-art .ca-cover { left: 6%; top: 9%; width: 88%; border-radius: 6px; }
.tpl-art .ca-pfp { left: 10%; top: 29%; width: 15%; border-radius: 50%; border: 3px solid #fff; }
.tpl-art .ca-post { right: 8%; bottom: -6%; width: 27%; border-radius: 4px; transform: rotate(4deg); }
.tpl-art .ca-post.b { right: 37%; bottom: -10%; width: 25%; transform: rotate(-5deg); }
.tpl-art .ca-pfps { position: absolute; left: 7%; bottom: 11%; display: flex; gap: 2.4%; width: 34%; }
.tpl-art .ca-pfps img { position: static; width: 23%; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.cover-list { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid rgba(20, 35, 30, .16); max-width: 46ch; }
.cover-list li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid rgba(20, 35, 30, .16); font-size: 14px; }
.cover-list b { font-weight: 500; }
.cover-list span { color: var(--ink-2); text-align: right; }

/* Scaled previews: tpl.js zooms the [data-w][data-h] children to fit the box */
.fitbox { min-width: 0; }
@media (min-width: 981px) { .fitbox { height: var(--fit); } }

/* Devices ------------------------------------------------------------------ */
.dev { flex: none; position: relative; }
.dev-bezel { height: 100%; }
.dev-screen { position: relative; width: 100%; height: 100%; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.dev::after, .dev-bezel::before, .dev-bezel::after { content: ""; position: absolute; }

/* iPhone 15 Pro, natural titanium */
.dev.ios { width: 421px; height: 880px; padding: 4px; border-radius: 66px;
  background: linear-gradient(140deg, #b7b4ae 0%, #6c6a66 18%, #a9a6a0 46%, #5d5b57 74%, #9e9b95 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 50px 70px -42px rgba(20, 35, 30, .6); }
.dev.ios .dev-bezel { border-radius: 62px; background: #0a0a0b; padding: 10px; }
.dev.ios .dev-screen { border-radius: 52px; }
.dev.ios .dev-bezel::before { left: -3px; top: 150px; width: 3px; height: 34px; border-radius: 2px 0 0 2px; background: #8b8984; box-shadow: 0 66px 0 0 #8b8984; }
.dev.ios .dev-bezel::after { left: -3px; top: 290px; width: 3px; height: 62px; border-radius: 2px 0 0 2px; background: #8b8984; }
.dev.ios::after { right: -3px; top: 240px; width: 3px; height: 100px; border-radius: 0 2px 2px 0; background: #8b8984; }
.ios-status { flex: none; position: relative; height: 54px; display: grid; grid-template-columns: 1fr 126px 1fr; align-items: center; padding-top: 4px;
  font: 600 17px/1 -apple-system, "SF Pro Text", system-ui, sans-serif; color: #000; letter-spacing: -.01em; }
.ios-time { justify-self: center; padding-left: 8px; }
.ios-island { position: absolute; left: 50%; top: 11px; width: 125px; height: 37px; margin-left: -62.5px; border-radius: 20px; background: #000; }
.ios-ico { grid-column: 3; justify-self: center; display: flex; align-items: center; gap: 6px; padding-right: 6px; }
.ios-home { position: absolute; left: 50%; bottom: 8px; width: 139px; height: 5px; margin-left: -69.5px; border-radius: 3px; background: #000; }
.dev.ios .app-tabs { padding-bottom: 30px; }

/* Samsung Galaxy S24, onyx black */
.dev.sam { width: 378px; height: 798px; padding: 3px; border-radius: 46px;
  background: linear-gradient(90deg, #45474c, #26272a 8%, #303236 50%, #26272a 92%, #45474c);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 50px 70px -42px rgba(20, 35, 30, .6); }
.dev.sam .dev-bezel { border-radius: 43px; background: #050505; padding: 6px; }
.dev.sam .dev-screen { border-radius: 37px; }
.dev.sam .dev-bezel::before { right: -3px; top: 160px; width: 3px; height: 92px; border-radius: 0 2px 2px 0; background: #3b3d42; }
.dev.sam .dev-bezel::after { right: -3px; top: 280px; width: 3px; height: 50px; border-radius: 0 2px 2px 0; background: #3b3d42; }
.and-status { flex: none; position: relative; height: 36px; display: flex; justify-content: space-between; align-items: center; padding: 2px 24px 0 26px;
  font: 500 13.5px/1 Roboto, "Segoe UI", system-ui, sans-serif; color: #111; }
.and-cam { position: absolute; left: 50%; top: 10px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px #1a1a1a; }
.and-ico { display: flex; align-items: center; gap: 5px; }
.and-ico b { font-weight: 500; font-size: 12.5px; }
.and-nav { flex: none; height: 44px; display: flex; justify-content: space-around; align-items: center; padding: 0 40px; background: #fff; }
.and-nav i { display: block; }
.and-nav .n-rec { width: 16px; height: 15px; background: linear-gradient(90deg, #555 0 2px, transparent 2px 7px, #555 7px 9px, transparent 9px 14px, #555 14px 16px); }
.and-nav .n-home { width: 17px; height: 17px; border: 2px solid #555; border-radius: 6px; }
.and-nav .n-back { width: 11px; height: 11px; border: solid #555; border-width: 0 0 2px 2px; transform: rotate(45deg); margin-left: 4px; }

/* Foldable iPhone, unfolded in landscape */
.dev.fold { width: 1028px; height: 732px; padding: 4px; border-radius: 50px;
  background: linear-gradient(160deg, #e3ded6 0%, #9a958e 28%, #d6d0c8 58%, #8a857e 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 50px 70px -42px rgba(20, 35, 30, .6); }
.dev.fold .dev-bezel { border-radius: 46px; background: #0a0a0b; padding: 10px; }
.dev.fold .dev-screen { border-radius: 37px; }
.dev.fold::after { top: -3px; right: 170px; width: 64px; height: 3px; border-radius: 2px 2px 0 0; background: #aaa59e; box-shadow: -84px 0 0 #aaa59e; }
.dev.fold .dev-bezel::before { left: 50%; top: 0; width: 2px; height: 4px; margin-left: -1px; background: #6f6a64; }
.dev.fold .dev-bezel::after { left: 50%; bottom: 0; width: 2px; height: 4px; margin-left: -1px; background: #6f6a64; }
.fold-crease { position: absolute; left: 50%; top: 0; bottom: 0; width: 18px; margin-left: -9px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .035) 45%, rgba(255, 255, 255, .06) 55%, transparent); }
.fold-status { flex: none; height: 34px; display: flex; justify-content: space-between; align-items: center; padding: 4px 30px 0;
  font: 500 15px/1 -apple-system, "SF Pro Text", system-ui, sans-serif; color: #000; }
.fold-status b { font-weight: 600; margin-right: 6px; }
.fold-status .ios-ico b { margin: 0; font-size: 14px; }
.dev.fold .app-top { padding: 4px 24px 10px; }
.dev.fold .app-scroll { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; padding: 14px 24px; align-content: start; }
.dev.fold .ap-cover { border-radius: 10px 10px 0 0; overflow: hidden; }
.dev.fold .ap-head { border-radius: 0 0 10px 10px; padding: 0 22px 18px; }
.dev.fold .ap-av { width: 124px; height: 124px !important; margin-top: -66px; }
.dev.fold .ap-main .ap-sec { margin-top: 10px; border-radius: 10px; }
.dev.fold .ap-btns { grid-template-columns: 140px 140px 34px; }
.dev.fold .app-tabs { padding-bottom: 22px; }
.ap-aside { display: none; }
.dev.fold .ap-aside { display: grid; gap: 10px; align-content: start; }
.dev.fold .ap-aside .ap-sec { margin: 0; border-radius: 10px; }
.ap-aside h4 { font-size: 16px; }
.ap-pp { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.ap-pp i { width: 44px; height: 44px; border-radius: 50%; background: #e3e1dc; flex: none; }
.ap-pp.sq i { border-radius: 6px; }
.la .sk, .li .sk { display: block; height: 9px; width: 130px; max-width: 90%; border-radius: 4px; background: #e8e7e3; margin: 6px 0; }
.la small.sk, .li small.sk { width: 84px; }
.li .sk.s { width: 60%; }

/* Laptop, MacBook style, with the phone in front: one canvas scaled as a whole */
.combo-box { display: grid; place-items: center; }
.combo { position: relative; width: 1900px; height: 990px; }
.laptop { position: absolute; left: 0; bottom: 0; width: 1700px; }
.lt-lid { position: relative; width: 1520px; margin: 0 auto; padding: 26px 40px 34px; background: #0c0c0e; border-radius: 32px 32px 8px 8px;
  box-shadow: inset 0 0 0 2px #2b2b2e, 0 0 0 3px #c4c5c9; }
.lt-notch { position: absolute; left: 50%; top: 0; width: 190px; height: 30px; margin-left: -95px; z-index: 2; background: #0c0c0e; border-radius: 0 0 12px 12px; }
.lt-notch::after { content: ""; position: absolute; left: 50%; top: 10px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #1d2230; }
.lt-screen { width: 1440px; height: 900px; overflow: hidden; background: #f4f2ee; }
.lt-base { position: relative; height: 30px; background: linear-gradient(180deg, #d9dadd, #bcbdc1 45%, #8f9196); border-radius: 2px 2px 28px 28px / 2px 2px 24px 24px;
  box-shadow: 0 30px 50px -26px rgba(20, 35, 30, .55); }
.lt-base i { position: absolute; left: 50%; top: 0; width: 240px; height: 10px; margin-left: -120px; background: linear-gradient(#a3a4a8, #c6c7ca); border-radius: 0 0 12px 12px; }
.combo .dev.ios { position: absolute; right: 0; bottom: 0; zoom: .76; }

.lfd-nav { height: 52px; background: #fff; border-bottom: 1px solid #e0dfdc; }
.lfd-in { width: 1128px; height: 100%; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.lfd-tabs { margin-left: auto; display: flex; }
.lfd-tabs > span { width: 80px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: rgba(0, 0, 0, .6); }
.lfd-tabs svg { width: 24px; height: 24px; }
.lfd-tabs .on { color: rgba(0, 0, 0, .9); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .9); }
.lfd-me { width: 24px; height: 24px; border-radius: 50%; background: #c6cfcb; }
.lfd-body { width: 1128px; margin: 0 auto; padding-top: 24px; display: grid; grid-template-columns: 225px 555px 300px; gap: 24px; align-items: start; }
.lfd-card { background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px var(--li-line); overflow: hidden; }
.lfd-me-card { display: grid; justify-items: center; padding-bottom: 16px; }
.lfd-me-card i { display: block; }
.lfd-cv { width: 100%; height: 56px; background: #a0b4b7; }
.lfd-av { width: 72px; height: 72px; margin-top: -36px; border-radius: 50%; border: 2px solid #fff; background: #d0d6d3; }
.lfd-list { margin-top: 8px; padding: 10px 14px; }
.lfd-news { padding: 12px 16px 16px; }
.lfd-news b { display: block; font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.lfd-news .sk:nth-of-type(odd) { width: 85%; margin-top: 12px; }
.lfd-c .fp-cap { -webkit-line-clamp: 2; }

/* LinkedIn app ------------------------------------------------------------- */
.la { --li-blue: #0a66c2; --li-2: rgba(0, 0, 0, .6); font: 14px/1.35 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; color: rgba(0, 0, 0, .9); }
.dev.sam .la { font-family: Roboto, "Segoe UI", system-ui, sans-serif; }
.la svg { display: block; }
.app-top { flex: none; display: flex; align-items: center; gap: 12px; padding: 4px 14px 8px; color: var(--li-2); background: #fff; }
.app-i { width: 24px; height: 24px; flex: none; }
.app-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 4px; background: #edf3f8; font-size: 15px; color: rgba(0, 0, 0, .75); }
.app-search svg { width: 18px; height: 18px; color: var(--li-2); }
.app-me { width: 30px; height: 30px; border-radius: 50%; background: #c6cfcb; color: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.app-me svg { width: 26px; height: 26px; margin-top: 6px; }
.app-scroll { flex: 1; min-height: 0; overflow: hidden; background: #f4f2ee; }
.app-tabs { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid #e6e6e6; padding: 6px 0 4px; }
.app-tabs span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--li-2); }
.app-tabs svg { width: 24px; height: 24px; }
.app-tabs .on { color: rgba(0, 0, 0, .9); }

.ap-cover { aspect-ratio: 4 / 1; background: #a0b4b7; }
.ap-cover img { width: 100%; height: 100%; object-fit: cover; }
.ap-head { background: #fff; padding: 0 16px 16px; }
.ap-av { position: relative; display: block; width: 104px; height: 104px !important; margin-top: -52px; border-radius: 50%; border: 4px solid #fff; background: #fff; }
.ap-head h3 { font-size: 22px; font-weight: 600; margin-top: 6px; }
.ap-hl { font-size: 15px; margin-top: 2px; }
.ap-mt { font-size: 13px; color: var(--li-2); margin-top: 6px; }
.ap-co { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-top: 8px; }
.ap-co img { width: 22px; height: 22px !important; border-radius: 3px; }
.ap-st { display: flex; gap: 14px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--li-blue); }
.ap-btns { display: grid; grid-template-columns: 1fr 1fr 34px; gap: 8px; margin-top: 14px; }
.ab { display: flex; align-items: center; justify-content: center; gap: 4px; height: 34px; border-radius: 999px; font-size: 16px; font-weight: 600; border: 1px solid; }
.ab svg { width: 16px; height: 16px; }
.ab.pri { background: var(--li-blue); border-color: var(--li-blue); color: #fff; }
.ab.sec { border-color: var(--li-blue); color: var(--li-blue); }
.ab.more { border-color: var(--li-2); color: var(--li-2); }
.ab.more svg { width: 18px; height: 18px; }
.ap-sec { background: #fff; margin-top: 8px; padding: 14px 16px 16px; }
.ap-sec h4 { font-size: 19px; font-weight: 600; }
.ap-sec > p:not(.ap-mt) { margin-top: 6px; }
.ap-act { display: flex; gap: 10px; margin-top: 10px; font-size: 13px; }
.ap-act img { width: 56px; height: 56px !important; border-radius: 4px; flex: none; }

.feed-scroll { padding-top: 8px; }
.fp { background: #fff; }
.fp-head { display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px 8px; }
.fp-av { width: 48px; height: 48px !important; border-radius: 50%; flex: none; }
.fp-head b { display: block; font-size: 14px; font-weight: 600; }
.fp-head small { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--li-2); line-height: 1.35; }
.fp-head small svg { width: 13px; height: 13px; }
.fp-follow { display: flex; align-items: center; gap: 3px; margin-left: auto; color: var(--li-blue); font-size: 15px; font-weight: 600; padding-top: 2px; }
.fp-follow svg { width: 16px; height: 16px; }
.fp-cap { font-size: 14px; padding: 0 16px 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fp-img { display: block; width: 100%; background: #eee; }
.fp-stats { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 12px; color: var(--li-2); }
.fp-r { display: inline-flex; align-items: center; margin-right: auto; }
.fp-r i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #fff; margin-right: -4px; }
.fp-r i:last-of-type { margin-right: 6px; }
.fp-r .r1 { background: #378fe9; } .fp-r .r2 { background: #6dae4f; } .fp-r .r3 { background: #df704d; }
.fp-acts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 12px; border-top: 1px solid #e8e8e8; }
.fp-acts span { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 10px; font-size: 12px; font-weight: 600; color: var(--li-2); }
.fp-acts svg { width: 22px; height: 22px; }
.fp-next { margin-top: 8px; }
.fp-ph { width: 48px; height: 48px; border-radius: 50%; background: #e9e9e7; flex: none; }
.fp .sk { display: block; height: 10px; width: 120px; border-radius: 4px; background: #e9e9e7; margin: 6px 0; }
.fp .sk.l { width: 90%; }

/* LinkedIn desktop */
.li { --li-blue: #0a66c2; --li-2: rgba(0, 0, 0, .6); --li-line: rgba(140, 140, 140, .25);
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: rgba(0, 0, 0, .9); line-height: 1.4; }
.li-desk { width: 900px; height: 500px; overflow: hidden; display: grid; gap: 10px; align-content: start; }
.li-card { background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px var(--li-line); overflow: hidden; }
.li-link { color: var(--li-blue); font-weight: 600; }
.li-b { display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 600; border: 1px solid; }
.li-b.pri { background: var(--li-blue); border-color: var(--li-blue); color: #fff; }
.li-b.sec { border-color: var(--li-blue); color: var(--li-blue); }
.li-b.ter { border-color: var(--li-2); color: var(--li-2); }
.li-search { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 4px; background: #edf3f8; color: var(--li-2); font-size: 14px; width: 240px; }
.li-search svg { width: 16px; height: 16px; }
.li-nav { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px var(--li-line); }
.li-logo { width: 34px; height: 34px; border-radius: 4px; background: var(--li-blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 21px; letter-spacing: -.04em; }
.li-navi { margin-left: auto; display: flex; align-items: center; gap: 30px; }
.li-navi i { width: 22px; height: 22px; border-radius: 5px; background: #d9d9d6; }
.li-navi img { width: 26px; height: 26px !important; border-radius: 50%; }
.li-cover { aspect-ratio: 4 / 1; background: #a0b4b7; }
.li-cover img { width: 100%; height: 100%; object-fit: cover; }
.li-avatar { width: 152px; margin: -96px 0 0 24px; position: relative; }
.li-avatar img { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 4px solid #fff; background: #fff; }
.li-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; padding: 10px 24px 24px; }
.li-main h3 { font-size: 24px; font-weight: 600; line-height: 1.25; }
.li-headline { font-size: 16px; margin-top: 2px; }
.li-meta { display: flex; gap: 8px; font-size: 14px; color: var(--li-2); margin-top: 6px; }
.li-st { gap: 14px; margin-top: 4px; }
.li-btns { display: flex; gap: 8px; margin-top: 14px; }
.li-side { display: grid; gap: 12px; align-content: start; font-size: 14px; font-weight: 600; }
.li-co { display: flex; align-items: center; gap: 10px; }
.li-co img, .li-co i { width: 32px; height: 32px !important; border-radius: 4px; flex: none; }
.li-co i { background: #e9e5df; }

/* 01 Simulator ------------------------------------------------------------- */
.sim { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; align-items: start; }
.sim-stage { background: #eceae4; border-radius: 14px; padding: 18px; }
.sim-stage:not([data-view="desktop"]) .desk, .sim-stage:not([data-view="fold"]) .fold-box, .sim-stage:not([data-view="phones"]) .devs { display: none; }
.fold-box { display: grid; place-items: center; }
.devs { display: flex; justify-content: center; align-items: center; gap: 44px; }
.desk { display: grid; place-items: center; }

.sim-ctl { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field-l { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.dd { position: relative; }
.dd-btn {
  width: 100%; height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; text-align: left; font-size: 14px; font-weight: 500;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dd-btn:hover, .dd-btn[aria-expanded="true"] { border-color: var(--muted); }
.dd-btn[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(111, 148, 135, .2); }
.dd-btn .dd-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn .ico { color: var(--ink-2); transition: transform .2s ease; }
.dd-btn[aria-expanded="true"] .ico { transform: rotate(180deg); }
.dd-th { flex: none; display: block; object-fit: cover; }
.dd-th.round { width: 36px; height: 36px !important; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.dd-th.wide { width: 76px; height: 19px !important; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); }
.dd-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 36px -18px rgba(20, 35, 30, .4); outline: none;
}
.dd-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.dd-list li:hover, .dd-list li.act { background: var(--stage); }
.dd-list li[aria-selected="true"] { font-weight: 500; }
.dd-list li[aria-selected="true"]::after { content: ""; width: 7px; height: 12px; margin: -4px 4px 0 auto; border: solid var(--eucalyptus); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.dd-list li .dd-th.wide { width: 100px; height: 25px !important; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 12px; background: var(--stage); border: 1px solid var(--line); }
.seg button { height: 36px; border: 0; border-radius: 9px; background: transparent; font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: background .18s ease, color .18s ease; }
.seg button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20, 35, 30, .12); }
#shuffle { justify-content: center; }
.pick { background: var(--linen); border-radius: 12px; padding: 14px 16px; }
.pick small { display: block; font-family: var(--mono); color: var(--eucalyptus); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.pick b { display: block; font-weight: 400; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.pick b span { font-weight: 500; color: var(--ink); }

/* 02 Posts ----------------------------------------------------------------- */
.posts { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(20px, 3vw, 40px); align-items: start; }
.post-pick { display: grid; gap: 22px; align-content: start; }
.pp-l { display: flex; align-items: baseline; gap: 10px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px; }
.pp-l b { font-size: 14px; font-weight: 500; color: var(--ink); }
.pp-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pp-row button { padding: 0; border: 0; background: none; text-align: left; }
.pp-row img { display: block; width: 100%; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .18s ease, transform .18s ease; }
.pp-row button:hover img { transform: translateY(-2px); }
.pp-row button[aria-checked="true"] img { box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--carbon); }
.pp-row span { display: block; font-size: 13px; margin-top: 7px; color: var(--ink-2); }
.pp-row button[aria-checked="true"] span { color: var(--ink); font-weight: 500; }
.pp-how { font-size: 13px; color: var(--ink-2); max-width: 52ch; }

/* Slides: shared by the editor, the layout menu and the source file card.
   The markup comes from build/prepare_slides.py: every part is placed inline, in cqw (1% of the slide width) */
.sl {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; container-type: inline-size;
  background: #fff center / 100% 100% no-repeat; color: #000; line-height: 1.2; text-align: left;
}
.sl > * { position: absolute; box-sizing: border-box; }
.sl i { display: block; }
.sl .tx { display: flex; flex-direction: column; overflow-wrap: break-word; }
.sl .tx p { margin: 0; margin-right: calc(-1 * var(--ri, 0px)); }
.sl p[data-bu]::before { content: attr(data-bu); display: inline-block; min-width: 1.2em; text-indent: 0; }
.sl [data-ph]:empty::before { content: attr(data-ph); opacity: .45; }
.sl .pic { overflow: hidden; }
.sl .pic img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.sl .ph-pic { background: rgba(128, 128, 128, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='m21 17-5-5-9 8'/%3E%3C/svg%3E") center / 8cqw no-repeat; }

/* 03 Slide editor ---------------------------------------------------------- */
.play { position: relative; display: flex; flex-direction: column; background: var(--stage); border: 1px solid var(--line); border-radius: 14px; }
@media (min-width: 981px) { .play { height: calc(var(--fit) + 20px); } }
.play-bar { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 12px 8px 18px; background: #fff; border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.play-t { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; margin-right: auto; }
.play-t .ico { width: 18px; height: 18px; }
.play-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.play-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: none; font-size: 13.5px; font-weight: 500; color: var(--ink); transition: background .15s ease; }
.play-btn:hover, .play-btn[aria-expanded="true"] { background: #e8eaed; }
.play-btn.icon { width: 34px; padding: 0; justify-content: center; }
.play-btn:disabled { opacity: .35; cursor: default; background: none; }
.play-btn .ico { width: 15px; height: 15px; }
.lay-menu {
  position: absolute; z-index: 30; right: 12px; top: calc(100% + 6px); width: min(760px, calc(100% - 24px));
  max-height: max(320px, calc(var(--fit, 600px) - 30px)); overflow-y: auto; padding: 14px 16px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 48px -20px rgba(20, 35, 30, .45);
}
.lay-menu.at-left { left: 12px; right: auto; }
.lay-t { font-size: 13px; font-weight: 500; margin-bottom: 12px; }
.lay-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lay-grid button { padding: 0; border: 0; background: none; text-align: center; font-size: 12px; line-height: 1.3; color: var(--ink-2); }
.lay-grid .sl { border-radius: 4px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 6px; transition: box-shadow .15s ease; }
.lay-grid button:hover .sl, .lay-grid button:focus-visible .sl { box-shadow: 0 0 0 2px var(--carbon); }
.lay-grid button:hover { color: var(--ink); }
.lay-grid .sl [data-ph], .stage-sl .sl [data-ph]:empty { outline: 1px dashed rgba(128, 128, 128, .5); outline-offset: -1px; }
.play-body { flex: 1; display: grid; grid-template-columns: 150px minmax(0, 1fr) 270px; min-height: 0; }
.strip-col { display: flex; flex-direction: column; min-height: 0; background: #fff; border-right: 1px solid var(--line); border-radius: 0 0 0 14px; }
.strip { list-style: none; margin: 0; padding: 14px 12px 10px; display: grid; gap: 12px; align-content: start; overflow-y: auto; min-height: 0; user-select: none; -webkit-user-select: none; }
.strip-add {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; margin: 0 12px 14px 32px;
  border: 1px dashed rgba(20, 35, 30, .22); border-radius: 4px; background: none; font-size: 12.5px; color: var(--ink-3);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.strip-add .ico { width: 13px; height: 13px; }
.strip-add:hover, .strip-add[aria-expanded="true"] { color: var(--ink); border-color: var(--muted); background: var(--stage); }
.strip button { display: grid; grid-template-columns: 14px 1fr; gap: 6px; align-items: start; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: grab; }
.strip small { font-size: 11px; color: var(--ink-3); padding-top: 2px; }
.strip .sl { border-radius: 3px; box-shadow: 0 0 0 1px var(--line); pointer-events: none; transition: box-shadow .15s ease; }
.strip .sl [data-ph]:empty::before { content: none; }
.strip button[aria-current="true"] .sl { box-shadow: 0 0 0 2px #f4b400; }
.strip button[aria-current="true"] small { color: var(--ink); font-weight: 600; }
.strip li.new .sl { animation: pop .35s cubic-bezier(.2, .8, .3, 1.2); }
.strip li.drag { position: relative; z-index: 2; }
.strip li.drag button { cursor: grabbing; }
.strip li.drag .sl { box-shadow: 0 0 0 2px #f4b400, 0 14px 24px -10px rgba(20, 35, 30, .5); transform: scale(1.04); }
.strip.dragging li:not(.drag) .sl { opacity: .8; }
@media (pointer: fine) { .strip { touch-action: none; } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.stage-wrap { display: grid; place-items: center; align-content: center; gap: 12px; padding: 16px 20px; min-height: 0; }
.stage-sl { width: 100%; }
@media (min-width: 981px) { .stage-sl { width: min(100%, calc((var(--fit) - 90px) * 16 / 9)); } }
.stage-sl .sl { border-radius: 2px; box-shadow: 0 1px 3px rgba(60, 64, 67, .25), 0 10px 30px -18px rgba(20, 35, 30, .35); }
.stage-sl [contenteditable] { outline: none; cursor: text; }
.stage-sl [contenteditable]:hover { outline: 1px solid rgba(26, 115, 232, .5); outline-offset: -1px; }
.stage-sl [contenteditable]:focus { outline: 2px solid #1a73e8; outline-offset: -2px; }
.play-hint { font-size: 12.5px; color: var(--ink-3); }

/* Notes: what the current slide's layout is for, and how to use it in Google Slides */
.play-notes { padding: 20px 20px 22px; background: #fff; border-left: 1px solid var(--line); border-radius: 0 0 14px 0; overflow-y: auto; min-height: 0; }
.nt-l { display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.nt-l span { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.nt-l b { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--eucalyptus); }
.nt-l b::before { content: ""; flex: none; width: 13px; height: 8px; border-radius: 1.5px; border: 1.5px solid currentColor; }
#nt-body h3 { font-size: 19px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; margin-bottom: 8px; }
#nt-body > p { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
#nt-body .nt-how { margin-top: 16px; padding: 12px 14px; border-left: 2px solid var(--almond); background: var(--stage); border-radius: 0 8px 8px 0; font-size: 13.5px; color: var(--ink); }
.nt-how b { display: block; margin-bottom: 4px; font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze); }
#nt-body:not(:empty) { animation: nt-in .3s ease; }
@keyframes nt-in { from { opacity: 0; } }

/* 04 Source files ---------------------------------------------------------- */
.srcs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.src { display: grid; gap: 18px; align-content: start; background: var(--linen); border-radius: 18px; padding: clamp(14px, 2vw, 22px); }
.src-art { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #fff; }
@media (min-width: 981px) { .src-art { aspect-ratio: auto; height: max(140px, calc(var(--fit) - 190px)); } }
.src-art.fig img { position: absolute; box-shadow: 0 14px 24px -16px rgba(20, 35, 30, .5); }
.src-art.fig .sa-cover { left: 6%; top: 8%; width: 88%; border-radius: 4px; }
.src-art.fig .sa-pfp { left: 10%; top: 31%; width: 15%; border-radius: 50%; border: 2px solid #fff; }
.src-art.fig .sa-post { top: 52%; width: 19%; border-radius: 4px; }
.src-art.fig .sa-post.p1 { left: 35%; } .src-art.fig .sa-post.p2 { left: 55%; } .src-art.fig .sa-post.p3 { left: 75%; }
.src-art.deck { display: flex; align-items: center; justify-content: center; background: none; }
.src-art.deck .sl { width: 100%; border-radius: 10px; }
@media (min-width: 981px) { .src-art.deck .sl { width: min(100%, calc(max(140px, calc(var(--fit) - 190px)) * 16 / 9)); } }
.src-info small { color: var(--eucalyptus); font-weight: 500; font-size: 12.5px; }
.src-info h3 { font-size: clamp(21px, 2vw, 25px); font-weight: 600; letter-spacing: -.02em; margin: 4px 0 6px; }
.src-info p { color: #33423c; max-width: 44ch; font-size: 14.5px; }
.src .g-actions { margin-top: 16px; }
.btn.locked, .btn.locked:hover { background: rgba(20, 35, 30, .08); border-color: transparent; color: rgba(20, 35, 30, .55); cursor: not-allowed; }
.btn.ghost.locked { background: transparent; border-color: rgba(20, 35, 30, .16); }
.btn.locked:active { transform: none; }

/* Smaller screens: sections stack and scroll as usual */
@media (max-width: 1180px) {
  .sim { grid-template-columns: minmax(0, 1fr) 240px; }
}
@media (max-width: 980px) {
  .sim { grid-template-columns: minmax(0, 1fr); }
  .sim-ctl { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
  .devs { justify-content: safe center; overflow-x: auto; scroll-snap-type: x mandatory; gap: 20px; padding-bottom: 6px; }
  .devs .dev { scroll-snap-align: center; }
  .desk { overflow: hidden; }
  .posts, .srcs { grid-template-columns: minmax(0, 1fr); }
  /* Editor: the strip goes under the slide, the notes under the strip; the slide never gets taller than the screen */
  .play-body { grid-template-columns: minmax(0, 1fr); }
  .strip-col { order: 2; flex-direction: row; align-items: center; border-right: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .strip { flex: 1; grid-auto-flow: column; grid-auto-columns: 130px; overflow-x: auto; padding-bottom: 14px; }
  .strip-add { width: 64px; height: 56px; margin: 0 12px 0 0; flex-direction: column; gap: 2px; font-size: 11px; }
  .play-notes { order: 3; border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
  .lay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-sl { width: min(100%, calc((100svh - 190px) * 16 / 9)); }
}
/* Phones, portrait and landscape: the posts preview is only the phone */
@media (max-width: 680px), (max-width: 980px) and (max-height: 500px) {
  .combo { width: 421px; height: 880px; }
  .combo .laptop { display: none; }
  .combo .dev.ios { zoom: 1; }
  .pp-l span:last-child, .pp-how { display: none; }
  .pp-row { display: flex; gap: 8px; }
  .pp-row button { flex: none; width: 84px; scroll-snap-align: start; }
  .pp-row span { font-size: 12px; margin-top: 5px; }
  .pp-l { margin-bottom: 8px; }
  .pp-group { flex: none; }
}
/* Phones in landscape: previews beside their controls, sized to the short screen */
@media (max-width: 980px) and (max-height: 500px) {
  .tpl .panel:not(.cover) { padding: 14px 24px 16px; }
  .tpl .side { position: static; }
  .tpl .panel { scroll-margin-top: 72px; }
  .tpl .sec-head { margin-bottom: 12px; }
  .tpl .sec-head h2 { font-size: 24px; }
  .tpl .sec-head .eyebrow { margin-bottom: 4px; }
  .tpl .sec-head > p { display: none; }
  .sim { grid-template-columns: minmax(0, 1fr) 220px; }
  .sim-ctl { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .field { gap: 3px; }
  .field-l { font-size: 10px; }
  .dd-btn { height: 40px; }
  .dd-th.round { width: 28px; height: 28px !important; }
  .seg { padding: 3px; }
  .seg button { height: 28px; font-size: 12.5px; }
  #shuffle { height: 34px; font-size: 12.5px; }
  .pick { display: none; }
  .sim-stage { padding: 12px; }
  .posts { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 24px; }
  .post-pick { display: flex; flex-wrap: wrap; gap: 16px; }
  /* Editor: strip back on the left, notes on the right, sized to the short screen */
  .play-hint { display: none; }
  .stage-wrap { padding: 10px; }
  .play-body { flex: none; height: max(200px, calc(100svh - 130px)); grid-template-columns: 120px minmax(0, 1fr) 210px; }
  .strip-col { order: 0; flex-direction: column; align-items: stretch; border-top: 0; border-right: 1px solid var(--line); border-radius: 0 0 0 14px; }
  .strip { grid-auto-flow: row; grid-auto-columns: auto; overflow-x: hidden; overflow-y: auto; padding: 10px; gap: 8px; }
  .strip-add { width: auto; height: 30px; margin: 0 10px 10px 30px; flex-direction: row; gap: 4px; font-size: 11.5px; }
  .stage-sl { width: min(100%, calc((100svh - 150px) * 16 / 9)); }
  .play-notes { order: 0; padding: 12px 14px; border-top: 0; border-left: 1px solid var(--line); border-radius: 0 0 14px 0; }
  #nt-body h3 { font-size: 16px; }
  #nt-body > p, #nt-body .nt-how { font-size: 12.5px; }
  .lay-menu { max-height: calc(100svh - 165px); }
  .lay-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 680px) {
  .tpl-art .ca-post { width: 32%; }
  .tpl-art .ca-post.b { display: none; }
  .cover-list li { flex-direction: column; gap: 2px; }
  .cover-list span { text-align: left; }
  .sim-ctl { grid-template-columns: minmax(0, 1fr); }
  .sim-stage { padding: 14px 10px; }
  .pp-row { gap: 8px; }
  /* Posts on phones: a smaller phone, the six templates in one swipeable row underneath */
  .combo-box { max-height: min(520px, calc(100svh - 330px)); }
  .posts { gap: 14px; }
  .post-pick { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 -22px; padding: 4px 22px 10px; scrollbar-width: none; }
  .post-pick::-webkit-scrollbar { display: none; }
  .src .g-actions .btn { width: 100%; justify-content: center; }
  .play-t { font-size: 0; gap: 0; }
  .play-bar { padding-left: 10px; }
  .play-hint { display: none; }
  .stage-wrap { padding: 10px; }
}
@media (max-width: 980px) and (max-height: 400px) {
  #shuffle { display: none; }
}
@media (max-width: 420px) {
  .tabs { gap: 14px; }
  .tabs a { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .strip li.new .sl, #nt-body:not(:empty) { animation: none; }
}
