/* ------------------------------------------------------------------
   zyli.cz: case-file plans. Manila folders, typed sheets, sticky notes.
   ------------------------------------------------------------------ */
:root {
  --desk-1: #ccd6de;
  --desk-2: #aebbc7;
  --desk-3: #8f9dab;
  --manila: #e9cda3;
  --manila-2: #e1c191;
  --manila-in: #dcb987;
  --manila-edge: #c9a475;
  --manila-deep: #a9855a;
  --paper: #fdfbf6;
  --paper-2: #f6f2e8;
  --ink: #302a23;
  --ink-2: #5d564b;
  --ink-3: #8b8175;
  --rule: #ded7c8;
  --cyan: #7fe0ee;
  --cyan-2: #63d4e4;
  --yellow: #ffe27a;
  --yellow-2: #ffd34d;
  --green: #9cefab;
  --green-2: #7ce68f;
  --pink: #ffb3c7;
  --pink-2: #ff96b3;
  --type: "Courier Prime", "Courier New", Courier, monospace;
  --hand: "Caveat", "Segoe Script", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: #2f3841;
  font: 400 16px/1.6 var(--type);
  background: var(--desk-1);
  background-image:
    radial-gradient(1100px 620px at 18% -6%, rgba(255, 255, 255, 0.55), transparent 62%),
    radial-gradient(900px 560px at 88% 8%, rgba(255, 255, 255, 0.32), transparent 60%),
    linear-gradient(170deg, var(--desk-1) 0%, var(--desk-2) 58%, var(--desk-3) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: #2b4a63; }
a:hover { color: #12324b; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 22px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--paper); color: var(--ink);
  padding: 10px 14px; font-size: 14px; border: 1.5px solid var(--ink);
}
.skip:focus { left: 8px; top: 8px; z-index: 20; }

/* ---------- masthead ---------- */
.masthead { padding: 44px 0 22px; }
.mast-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.stamp {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #38424c;
  border: 1.5px solid rgba(56, 66, 76, 0.55); padding: 5px 11px; border-radius: 3px;
  transform: rotate(-1.6deg); white-space: nowrap;
}
.stamp--right { transform: rotate(1.4deg); }
.masthead h1 {
  margin: 20px 0 10px; font-size: clamp(29px, 5vw, 45px); line-height: 1.12;
  letter-spacing: -0.012em; font-weight: 700; color: #232b33;
}
.colon { color: #8a7a5e; }
.lede { margin: 0; max-width: 70ch; font-size: 15.5px; color: #3d4854; }

/* ---------- closing quote ---------- */
.closing { padding-top: 48px; }

.meme-quote {
  max-width: 640px; margin: 0 auto; padding: 22px 24px 24px;
  background: linear-gradient(165deg, #ffc4d3 0%, var(--pink-2) 100%);
  box-shadow: 0 16px 24px -16px rgba(26, 34, 42, 0.55), 0 2px 6px rgba(26, 34, 42, 0.16);
  transform: rotate(1.1deg);
}
.meme-quote .sticky-cap { color: rgba(74, 31, 43, 0.62); }
.meme-text { margin: 8px 0 0; font-family: var(--hand); font-size: 24px; line-height: 1.3; color: #4a1f2b; }

/* ---------- deck ---------- */
.deck-section { padding-top: 6px; }

.deck-bar {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding-bottom: 14px;
}
.nav-btn {
  width: 46px; height: 46px; flex: none; cursor: pointer;
  font: 700 17px/1 var(--type); color: #2b241c;
  background: var(--paper); border: 1.5px solid #35302a; border-radius: 4px;
  box-shadow: 2px 2px 0 #35302a; transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.nav-btn:hover { background: #fff; }
.nav-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.nav-btn:focus-visible { outline: 2px dashed #2b241c; outline-offset: 3px; }
.deck-count { font-size: 14px; letter-spacing: 0.16em; color: #38424c; }
.deck-count b { font-size: 17px; }

.deck {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 0 34px;
  scrollbar-width: thin;
  scrollbar-color: rgba(53, 48, 42, 0.4) transparent;
}
.deck:focus-visible { outline: 2px dashed #2b241c; outline-offset: -4px; }
.deck::-webkit-scrollbar { height: 8px; }
.deck::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.25); border-radius: 8px; }
.deck::-webkit-scrollbar-thumb { background: rgba(53, 48, 42, 0.38); border-radius: 8px; }

.case {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 22px;
}
.case[hidden] { display: none; }

/* ---------- the folder ---------- */
.folder {
  position: relative;
  width: min(100%, 1080px);
  background: linear-gradient(168deg, var(--manila) 0%, var(--manila-2) 62%, #d9b784 100%);
  border-radius: 3px 10px 8px 8px;
  padding: 24px;
  transform: rotate(-0.35deg);
  box-shadow:
    0 30px 44px -22px rgba(26, 34, 42, 0.6),
    0 8px 16px -8px rgba(26, 34, 42, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.folder-tab {
  position: absolute; top: -23px; right: 40px; height: 25px; padding: 0 20px;
  background: linear-gradient(180deg, var(--manila) 0%, #dcbe8f 100%);
  border-radius: 8px 8px 0 0;
  font: 700 11px/25px var(--type); letter-spacing: 0.2em; color: #6d5637;
  box-shadow: 0 -3px 8px rgba(26, 34, 42, 0.14);
}
.folder-in {
  display: grid;
  grid-template-columns: 306px 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: 3px;
  background: linear-gradient(160deg, #dcb987 0%, #d3ae7c 100%);
  box-shadow: inset 0 3px 14px rgba(102, 72, 34, 0.24);
}

/* ---------- left leaf: cards and sticky notes ---------- */
.leaf { display: flex; flex-direction: column; gap: 16px; }

.note {
  position: relative;
  padding: 15px 16px;
  box-shadow: 0 8px 16px -8px rgba(26, 34, 42, 0.45), 0 2px 5px rgba(26, 34, 42, 0.14);
}
.note--white {
  background: var(--paper);
  border-radius: 2px;
  transform: rotate(-0.7deg);
  display: flex; flex-direction: column; gap: 12px;
}

.face-wrap { position: relative; display: inline-block; width: 96px; }
.face-wrap::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 46px; height: 17px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 255, 255, 0.62);
  border-left: 1px solid rgba(0, 0, 0, 0.06); border-right: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16); z-index: 2;
}
.face {
  display: block; width: 96px; height: 96px; object-fit: cover;
  border: 4px solid #fff; background: #ddd7ca;
  box-shadow: 0 1px 4px rgba(26, 34, 42, 0.35);
  transform: rotate(-1.2deg);
}
.face--fallback {
  display: grid; place-items: center; color: #6d6455; font: 700 24px/1 var(--type);
  background: linear-gradient(160deg, #ece7db, #dcd5c6);
}

.ident { display: flex; flex-direction: column; gap: 1px; }
.tick { font: 700 24px/1.15 var(--type); letter-spacing: 0.06em; color: #26211b; }
.co { font-size: 14px; color: var(--ink-2); }
.ceo { font-size: 13px; color: var(--ink-3); }
.chip {
  align-self: flex-start; font: 700 10px/1 var(--type); letter-spacing: 0.14em; text-transform: uppercase;
  color: #6d5637; background: rgba(201, 164, 117, 0.26);
  border: 1px solid rgba(169, 133, 90, 0.5); border-radius: 3px; padding: 5px 8px;
}

.sticky {
  position: relative;
  padding: 14px 16px 16px;
  border-radius: 2px;
  font-family: var(--hand);
  font-size: 18px;
  line-height: 1.34;
  color: #2b352c;
  box-shadow: 0 10px 18px -10px rgba(26, 34, 42, 0.5), 0 2px 5px rgba(26, 34, 42, 0.15);
}
.sticky--cyan { background: linear-gradient(165deg, #8ce7f3 0%, var(--cyan-2) 100%); transform: rotate(1.1deg); }
.sticky--yellow { background: linear-gradient(165deg, #ffe98f 0%, var(--yellow-2) 100%); transform: rotate(-1.3deg); }
.sticky--green { background: linear-gradient(165deg, #a9f4b8 0%, var(--green-2) 100%); transform: rotate(0.8deg); }
.sticky--pink { background: linear-gradient(165deg, #ffc4d3 0%, var(--pink-2) 100%); transform: rotate(-1deg); }

.sticky-cap {
  display: block; font: 700 9.5px/1 var(--type); letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(43, 53, 44, 0.6); margin-bottom: 5px;
}
.sticky--price { display: flex; flex-direction: column; }
.px { font: 700 27px/1.1 var(--type); letter-spacing: -0.01em; color: #23301f; }
.chg { font: 700 13px/1.4 var(--type); color: rgba(35, 48, 31, 0.7); }
.chg.up { color: #1d6b34; }
.chg.down { color: #973030; }
.screen-nums { font: 700 20px/1.2 var(--type); letter-spacing: 0.08em; }
.sticky--note { font-size: 16.5px; }

.sticky--stats { display: flex; flex-direction: column; gap: 3px; }
.sticky--stats .cap { font: 700 24px/1.15 var(--type); letter-spacing: -0.01em; color: #3a2f10; }
.sticky--stats .ret { font: 700 13.5px/1.4 var(--type); color: rgba(58, 47, 16, 0.82); }
.sticky--stats .ret-lbl { letter-spacing: 0.06em; }

.screens-line {
  width: 100%;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 11px; border-top: 1px dashed #ded7c8;
}
.screens-line .sticky-cap { margin-bottom: 0; color: rgba(93, 86, 75, 0.75); }
.screen-btns { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.screen-btn {
  width: 26px; height: 26px; padding: 0; cursor: pointer;
  font: 700 12px/1 var(--type); color: #4a3f22;
  background: #fff8dc; border: 1.4px solid #b99f5e; border-radius: 3px;
  transition: transform 0.1s ease, background 0.1s ease;
}
.screen-btn:hover { background: var(--yellow); transform: translateY(-1px); }
.screen-btn[aria-pressed="true"] { background: var(--yellow-2); border-color: #8a7328; }

/* ---------- right leaf: the typed sheet ---------- */
.sheet {
  position: relative;
  background: var(--paper);
  background-image: radial-gradient(rgba(0, 0, 0, 0.016) 1px, transparent 0);
  background-size: 4px 4px;
  border-radius: 2px;
  padding: 26px 34px 30px;
  box-shadow: 0 16px 26px -14px rgba(26, 34, 42, 0.55), 0 3px 9px rgba(26, 34, 42, 0.2);
}

.clip {
  position: absolute; top: -17px; left: 54px; width: 27px; height: 62px;
  color: #8d8d8d; transform: rotate(-7deg);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.28));
}

.sheet-kicker {
  margin: 6px 0 0; text-align: center;
  font: 400 clamp(24px, 3vw, 31px) / 1.2 var(--type); letter-spacing: 0.01em; color: #24201a;
}
.plan-title {
  margin: 2px 0 18px; padding-bottom: 14px; text-align: center;
  font: 700 19px/1.3 var(--type); letter-spacing: 0.11em; text-transform: uppercase; color: #3a3229;
  border-bottom: 1px dashed var(--rule);
}

.problem, .why { margin: 0; font-size: 15px; line-height: 1.62; color: #3b352d; }
.lbl {
  display: block; margin-bottom: 3px;
  font: 700 10px/1 var(--type); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3);
}
.why { margin-top: 20px; }

.objection {
  margin: 24px 0 0;
  padding: 14px 16px 15px;
  background: #fffdf3;
  border: 1.6px solid #c9c2b4;
  border-radius: 225px 12px 255px 12px / 12px 255px 12px 225px;
}
.obj-ask, .obj-ans { margin: 0; font-size: 14.5px; line-height: 1.5; color: #3b352d; }
.obj-ask { font-style: italic; color: #6b6357; }
.obj-ans { margin-top: 9px; font-weight: 700; color: #2f2a23; }
.objection .lbl { margin-bottom: 2px; }

.cost {
  margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--rule);
  font-size: 15px; line-height: 1.5; color: #3b352d;
}

.steps {
  list-style: none; margin: 22px 0 0; padding: 0;
  counter-reset: step;
}
.steps li {
  position: relative;
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 13px;
  background: #fff;
  border: 1.6px solid #332d26;
  border-radius: 255px 12px 225px 12px / 12px 225px 12px 255px;
  font-size: 14.5px; line-height: 1.5; color: #2f2a23;
}
.steps li + li { margin-top: 28px; }
.steps li + li::before {
  content: "\2193";
  position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
  font: 700 19px/1 var(--type); color: #332d26;
}
.step-n { font-weight: 700; color: #8a7a5e; }

.caption {
  margin: 22px 0 0; text-align: center;
  font: 600 20px/1.35 var(--hand); color: #5c5245;
}

/* ---------- dots ---------- */
.dots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-bottom: 4px; }

.filter-bar {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px;
  background: linear-gradient(165deg, #ffe98f 0%, var(--yellow-2) 100%);
  border: 1.5px solid #b99f5e; border-radius: 3px;
  box-shadow: 2px 2px 0 rgba(53, 48, 42, 0.3);
  font-size: 13.5px; color: #3a2f10;
}
.filter-bar[hidden] { display: none; }
.filter-text { font-weight: 700; }
.filter-clear {
  cursor: pointer; font: 700 12px/1 var(--type); letter-spacing: 0.06em; color: #2b241c;
  background: var(--paper); border: 1.4px solid #35302a; border-radius: 3px; padding: 8px 12px;
  box-shadow: 1.5px 1.5px 0 #35302a;
}
.filter-clear:active { transform: translate(1.5px, 1.5px); box-shadow: none; }
.dot {
  width: 13px; height: 13px; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.55); border: 1.4px solid #4a5460; border-radius: 2px;
  transition: transform 0.12s ease;
}
.dot:hover { transform: translateY(-2px); }
.dot[aria-current="true"] { background: #35302a; border-color: #35302a; }
.swipe-hint { text-align: center; font-size: 12.5px; letter-spacing: 0.12em; color: #4a5460; margin: 12px 0 0; text-transform: uppercase; }
.asof { text-align: center; margin: 6px 0 0; font-size: 12.5px; color: #55606c; }
.asof.is-live::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #2f9e57; margin-right: 7px; vertical-align: 1px;
  box-shadow: 0 0 0 3px rgba(47, 158, 87, 0.18);
}

/* ---------- thesis papers ---------- */
.thesis { padding-top: 26px; }

.paper {
  position: relative;
  background: var(--paper);
  border-radius: 2px;
  padding: 34px 38px 30px;
  margin-top: 44px;
  box-shadow: 0 24px 34px -24px rgba(26, 34, 42, 0.6), 0 4px 10px rgba(26, 34, 42, 0.16);
}
.paper::before {
  content: ""; position: absolute; top: -10px; left: 50%; width: 74px; height: 21px;
  transform: translateX(-50%) rotate(-1.5deg);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.paper-title { margin: 0 0 6px; font: 700 24px/1.25 var(--type); letter-spacing: -0.01em; color: #26211b; }
.paper-sub { margin: 0 0 22px; font-size: 14.5px; color: var(--ink-2); max-width: 78ch; }

.rules { list-style: none; margin: 0; padding: 0; }
.rule { border-bottom: 1px dashed var(--rule); }
.rule:last-child { border-bottom: 0; }
.rule-btn {
  width: 100%; display: grid; grid-template-columns: 28px 1fr auto 1fr auto; gap: 14px; align-items: baseline;
  padding: 12px 10px; margin: 0; border: 0; border-radius: 3px; background: none;
  font: inherit; font-size: 15px; color: inherit; text-align: left; cursor: pointer;
  transition: background 0.12s ease;
}
.rule-btn:hover { background: #fffbdc; }
.rule-btn:focus-visible { outline: 2px dashed #35302a; outline-offset: -2px; }
.rule-btn[aria-pressed="true"] { background: linear-gradient(165deg, #ffe98f 0%, var(--yellow-2) 100%); }
.rule-n { font-weight: 700; color: #8a7a5e; font-size: 13px; }
.rule-good { font-weight: 700; color: #2b251e; }
.rule-vs { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #a49a8b; }
.rule-bad { text-align: right; color: #7c7264; }
.rule-count { font: 700 10px/1 var(--type); letter-spacing: 0.14em; text-transform: uppercase; color: #a49a8b; white-space: nowrap; }

.stack-head { margin: 44px 0 16px; }
.stack-head h3 {
  margin: 0; font: 700 13px/1 var(--type); letter-spacing: 0.2em; text-transform: uppercase; color: #38424c;
}

.combos { list-style: none; margin: 0; padding: 6px 2px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sticky--combo { display: flex; flex-direction: column; gap: 7px; padding: 20px 20px 22px; }
.combo-screens { font: 700 13px/1 var(--type); letter-spacing: 0.1em; color: rgba(43, 53, 44, 0.72); }
.combo-name { font: 700 23px/1.15 var(--hand); color: #23301f; }
.combo-gloss { font-size: 17px; }

.index-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.index-card {
  background: #fff; border: 1px solid #e8e2d4; border-left: 4px solid var(--manila-edge);
  padding: 18px 20px; box-shadow: 2px 3px 0 rgba(26, 34, 42, 0.07);
}
.index-card h4 { margin: 0 0 3px; font: 700 16px/1.3 var(--type); color: #26211b; }
.arch-tag { margin: 0 0 10px; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #a49a8b; }
.index-card p:last-child { margin: 0; font-size: 14px; line-height: 1.6; color: #55503f; }

.principles { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.principles li {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px;
  background: #fffbdc; border: 1px dashed #e0cf9a; font-size: 15.5px; color: #3d3830;
}
.principles .sticky-cap { color: rgba(61, 56, 48, 0.55); }

.pm { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 30px; }
.pm li {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px dashed var(--rule); font-size: 15px; color: #3d3830;
}
.pm-n { font: 700 12.5px/1.5 var(--type); color: #a49a8b; }

/* ---------- footer ---------- */
.foot { padding: 62px 0 70px; }
.disc { margin: 0 0 14px; max-width: 92ch; font-size: 13px; color: #3f4a55; }
.credits summary { cursor: pointer; font-size: 13px; color: #35404b; }
.credits summary:hover { color: #16303f; }
.credits ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 3px; font-size: 12.5px; color: #46515c; }
.sig { margin: 16px 0 0; font-size: 13px; color: #35404b; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .folder-in { grid-template-columns: 1fr; gap: 16px; }
  .leaf { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .note--id { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px; }
  .note--id .ident { flex: 1 1 130px; min-width: 130px; }
  .note--id .chip { flex: 0 0 auto; }
  .note--id .screens-line { flex: 1 0 100%; }
  .sticky--note { grid-column: 1 / -1; }
  .combos { grid-template-columns: 1fr; }
  .meme-quote { transform: none; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 15px; }
  .masthead { padding: 30px 0 14px; }
  .folder { padding: 16px; transform: none; }
  .folder-tab { right: 22px; padding: 0 14px; }
  .folder-in { padding: 12px; }
  .sheet { padding: 22px 20px 26px; }
  .clip { left: 26px; }
  .paper { padding: 26px 20px 22px; margin-top: 32px; }
  .index-cards, .principles, .pm { grid-template-columns: 1fr; }
  .rule-btn { grid-template-columns: 24px 1fr; gap: 6px 12px; padding: 12px 6px; }
  .rule-vs { display: none; }
  .rule-bad { grid-column: 2; text-align: left; }
  .rule-bad::before { content: "instead of "; color: #b3a795; }
  .rule-count { grid-column: 2; }
  .case { padding: 0 12px; }
  .deck { padding: 18px 0 26px; }
  .face, .face-wrap, .face-wrap::before { width: 78px; }
  .face { height: 78px; }
  .tick { font-size: 21px; }
  .note--id .ident { flex: 1 1 110px; min-width: 110px; }
  .note--id .chip { flex: 1 0 100%; }
}

@media (max-width: 520px) {
  .leaf { grid-template-columns: 1fr; }
  .mast-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .stamp--right { align-self: flex-end; }
  .nav-btn { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .deck { scroll-behavior: auto; }
  * { transition: none !important; }
}
