/* The document library: the documents themselves are the design. Shared by the homepage and /documents
   (moved out of index.html on 24 Oct 2026 so the 2 pages cannot drift). */
.lib { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 28px; }
main a.lib-doc { display: block; text-decoration: none; color: var(--text-primary); }
main a.lib-doc:hover { color: var(--text-primary); }
.lib-wide { grid-column: span 2; }
.lib-doc:nth-child(2) { grid-column: span 2; }
.lib-stage { container-type: inline-size; position: relative; border-radius: 16px; overflow: hidden;
  background: var(--stage-gradient);
  aspect-ratio: 16 / 9.4; margin-bottom: 18px; }
.lib-port .lib-stage { aspect-ratio: 4 / 4.6; }
.lib-doc h3 { font-size: 19px; letter-spacing: -.012em; }
.lib-doc > p { font-size: 15px; color: var(--text-secondary); margin-top: 6px; line-height: 1.55; max-width: 520px; text-wrap: pretty; }

/* Paper: the customer's brand inside (Acme navy and blue), real shadow outside. */
.pg, .sl, .pp { position: absolute; background: #fff; color: #0a2540; font-family: var(--sans);
  box-shadow: var(--paper-shadow);
  transition: transform .5s var(--paper-ease); }
.pg { width: 37cqw; aspect-ratio: 1 / 1.3; top: 6.5cqw; padding: 2.6cqw 2.4cqw; border-radius: 3px; }
.pg-a { left: 10cqw; transform: rotate(-1.6deg); }
.pg-b { left: 52cqw; transform: rotate(1.2deg); top: 8cqw; }
.lib-doc:hover .pg-a { transform: rotate(-.6deg) translateY(-1.4cqw); }
.lib-doc:hover .pg-b { transform: rotate(.4deg) translateY(-1cqw); }
.pg-top { display: flex; justify-content: space-between; align-items: baseline; border-bottom: .3cqw solid #0a2540; padding-bottom: 1cqw; }
.pg-logo, .sl-logo { font: 800 1.6cqw/1 var(--sans); letter-spacing: .14em; }
.pg-logo i, .sl-logo i { color: #3d7dca; font-style: normal; }
.pg-meta { font-size: 1.05cqw; color: #5b6b80; }
.pg-h { font-size: 2.05cqw; font-weight: 700; line-height: 1.2; margin: 1.8cqw 0 1.6cqw; letter-spacing: -.01em; }
.pg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqw; }
.pg-r { border-left: .25cqw solid #3d7dca; padding-left: 1.4cqw; }
.pg-k { font-size: .95cqw; font-weight: 700; color: #3d7dca; margin-bottom: .9cqw; }
.pg-cols p { font-size: 1.15cqw; line-height: 1.38; margin: 0 0 .5cqw; color: #1d2f45; }
.pg-src { display: inline-block; font-size: .85cqw; font-weight: 600; color: var(--brand-ink); background: rgba(181,80,47,.1); padding: .2cqw .6cqw; border-radius: .4cqw; margin: 0 0 1cqw; }
.pg-quote { font-size: 2.1cqw; font-weight: 700; line-height: 1.22; letter-spacing: -.01em; padding-top: 1cqw; }
.pg-quote::before { content: ""; display: block; width: 3cqw; height: .5cqw; background: var(--brand-primary); margin-bottom: 1.4cqw; }
.pg-who { font-size: 1.05cqw; color: #5b6b80; margin-top: 1cqw; }
.pg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8cqw; margin-top: 2.4cqw; }
.pg-stats div { background: #f1f5fa; border-top: .35cqw solid #3d7dca; padding: 1cqw .8cqw; }
.pg-stats b { display: block; font-size: 1.8cqw; letter-spacing: -.02em; }
.pg-stats span { display: block; font-size: .85cqw; color: #5b6b80; margin-top: .3cqw; line-height: 1.25; }
.pg-btn { position: absolute; left: 2.4cqw; bottom: 2.4cqw; background: #0a2540; color: #fff; font-size: 1.05cqw; font-weight: 600; padding: .9cqw 1.4cqw; border-radius: .5cqw; }

/* Slides */
.sl { width: 72cqw; aspect-ratio: 16 / 9; border-radius: 1cqw; padding: 4cqw 4.4cqw; }
.sl-back { left: 20cqw; top: 6cqw; background: #eef3f9; transform: rotate(3deg); }
.sl-back .sl-h { color: #5b6b80; }
.sl-bars { display: flex; gap: 2cqw; margin-top: 3cqw; }
.sl-bars span { height: 2cqw; flex: 1; background: #d6e2f0; border-radius: 1cqw; }
.sl-front { left: 8cqw; top: 13cqw; background: #0a2540; color: #fff; transform: rotate(-1.4deg); }
.lib-doc:hover .sl-front { transform: rotate(-.4deg) translateY(-1.6cqw); }
.sl-front .sl-logo { color: #fff; font-size: 2cqw; }
.sl-h { font-size: 4.2cqw; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: 3cqw; max-width: 80%; }
.sl-chart { display: flex; align-items: flex-end; gap: 3cqw; height: 13cqw; margin-top: 3cqw; padding-left: .5cqw; }
.sl-chart span { width: 9cqw; background: #3d7dca; border-radius: .6cqw .6cqw 0 0; position: relative; }
.sl-chart span:last-child { background: var(--brand-on-dark); }
.sl-chart em { position: absolute; top: -3.2cqw; left: 0; font-style: normal; font-size: 2cqw; font-weight: 600; white-space: nowrap; }
.sl-cap { font-size: 1.7cqw; color: rgba(255,255,255,.65); margin-top: 1.6cqw; }

/* Portrait pages */
.pp { left: 12cqw; right: 12cqw; top: 10cqw; bottom: -4cqw; border-radius: 3px; padding: 7cqw 7cqw; transform: rotate(-1deg); }
/* Real documents, made in Liffey from the Acme demo brain (22 Oct 2026), on the same paper. */
.pp.pp-shot, .sl.sl-shot, .pg.pg-shot { padding: 0; overflow: hidden; }
.pp-shot img, .sl-shot img, .pg-shot img { display: block; width: 100%; height: auto; }
.sl.sl-shot.sl-back { background: #fff; }
/* A proposal is a full document: plain sheets peek out from behind its cover (Brendan, 22 Oct 2026). */
.leaf { position: absolute; left: 12cqw; right: 12cqw; top: 10cqw; bottom: -4cqw; border-radius: 3px; box-shadow: var(--paper-shadow); transition: transform .6s var(--paper-ease); }
.leaf.l1 { background: #ffffff; transform: translate(3.6cqw, -1.8cqw) rotate(2deg); }
.leaf.l2 { background: #efe7d8; transform: translate(7.2cqw, -3.4cqw) rotate(4deg); }
.leaf.l3 { background: #c9d3e2; transform: translate(10.6cqw, -5cqw) rotate(6deg); }
.lib-doc:hover .leaf.l1 { transform: translate(4.4cqw, -2.6cqw) rotate(2.6deg); }
.lib-doc:hover .leaf.l2 { transform: translate(8.6cqw, -4.6cqw) rotate(5deg); }
.lib-doc:hover .leaf.l3 { transform: translate(12.6cqw, -6.6cqw) rotate(7.4deg); }
.lib-port:nth-child(even) .pp { transform: rotate(1.1deg); }
.lib-doc:hover .pp { transform: rotate(0) translateY(-2cqw); }
.pp-k { font-size: 3.2cqw; font-weight: 700; color: #3d7dca; }
.pp-h { font-size: 6.4cqw; font-weight: 700; line-height: 1.16; letter-spacing: -.015em; margin: 3cqw 0 5cqw; }
.pp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; }
.pp-stats div { border-top: 1cqw solid #3d7dca; padding-top: 2cqw; }
.pp-stats b { display: block; font-size: 8cqw; letter-spacing: -.03em; line-height: 1; }
.pp-stats span { display: block; font-size: 3cqw; color: #5b6b80; margin-top: 1cqw; }
.pp-quote { font-size: 3.8cqw; font-weight: 600; line-height: 1.3; margin-top: 5cqw; padding-left: 3cqw; border-left: 1cqw solid var(--brand-primary); }
.pp-lines { margin-top: 5cqw; display: grid; gap: 2.2cqw; }
.pp-lines i { display: block; height: 1.6cqw; background: #e6edf5; border-radius: 1cqw; }
.pp-lines i.s { width: 62%; }
.pp-table .r { display: grid; grid-template-columns: 1.5fr 1fr .7fr; font-size: 3.2cqw; padding: 2.2cqw 0; border-top: .4cqw solid #edf1f6; align-items: center; }
.pp-table .r.h { font-weight: 700; color: #5b6b80; border-top: 0; font-size: 2.8cqw; }
.pp-table .r span:nth-child(2) { color: #8a98ab; text-align: center; }
.pp-table .r span:nth-child(3) { text-align: center; font-weight: 700; }
.pp-table .y { color: #3d7dca; }
.pp-list { font-size: 3.6cqw; line-height: 2; color: #1d2f45; }
.pp-list span { display: inline-grid; place-items: center; width: 5.4cqw; height: 5.4cqw; border-radius: 50%; background: #eaf0f7; color: #3d7dca; font-weight: 700; font-size: 2.8cqw; margin-right: 2cqw; }
.pp-price { margin-top: 5cqw; background: #0a2540; color: #fff; border-radius: 1.4cqw; padding: 3.4cqw 4cqw; display: flex; justify-content: space-between; align-items: baseline; }
.pp-price span { font-size: 3cqw; color: rgba(255,255,255,.7); }
.pp-price b { font-size: 6.4cqw; letter-spacing: -.02em; }
.pp-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4cqw; }
.pp-tiers div { border: .4cqw solid #e3e9f1; border-radius: 1.4cqw; padding: 3cqw 2cqw; text-align: center; }
.pp-tiers div.on { border-color: #3d7dca; background: #f1f6fc; box-shadow: 0 2cqw 4cqw -2cqw rgba(61,125,202,.5); }
.pp-tiers span { display: block; font-size: 2.5cqw; color: #5b6b80; line-height: 1.25; }
.pp-tiers b { display: block; font-size: 5.4cqw; margin-top: 1.6cqw; letter-spacing: -.02em; }

/* The shelf: the rest of the library */
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin-top: 64px; border-top: 1px solid var(--border-medium); }
main a.shelf-item { display: grid; grid-template-columns: 34px 1fr; column-gap: 16px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--border-light); text-decoration: none; color: var(--text-primary); }
main a.shelf-item:hover { color: var(--text-primary); }
.shelf-item b { font-size: 16px; font-weight: 600; grid-column: 2; }
.shelf-deal { grid-column: 2; font-style: normal; font-size: 12px; font-weight: 600; color: var(--brand-ink); margin-top: 2px; }
.shelf-item span { grid-column: 2; font-size: 14px; color: var(--text-secondary); margin-top: 3px; line-height: 1.5; text-wrap: pretty; }
.glyph { grid-row: span 3; width: 30px; height: 38px; background: #fff; border-radius: 2px; position: relative; box-shadow: 0 6px 12px -6px rgba(23,21,15,.4), 0 0 0 1px rgba(23,21,15,.06); transition: transform .3s ease; }
.glyph::before { content: ""; position: absolute; left: 5px; right: 5px; top: 6px; height: 4px; border-radius: 1px; background: currentColor; }
.glyph::after { content: ""; position: absolute; left: 5px; right: 9px; top: 14px; height: 14px; background: repeating-linear-gradient(#dfe6ef 0 2px, transparent 2px 5px); }
/* The shelf glyphs echo the 6 documents above: Acme navy, burnt orange and cream, each a different layout (22 Oct 2026). */
.glyph::after { background: repeating-linear-gradient(rgba(10,37,64,.2) 0 2px, transparent 2px 5px); }
.g-banner { background: linear-gradient(#0a2540 0 15px, #fff 15px); color: #b5502f; }
.g-banner::before { top: 6px; right: 12px; height: 3px; } .g-banner::after { top: 19px; height: 12px; }
.g-cream { background: #f2eadc; color: #b5502f; }
.g-cream::before { right: 15px; } .g-cream::after { top: 14px; }
.g-rules { color: #0a2540; }
.g-rules::before { height: 2px; } .g-rules::after { left: 5px; right: 5px; background: repeating-linear-gradient(rgba(10,37,64,.32) 0 1px, transparent 1px 4px); }
.g-split { background: linear-gradient(90deg, #fff 0 60%, #0a2540 60%); color: #b5502f; }
.g-split::before { right: 17px; } .g-split::after { right: 15px; }
.g-cover { background: #0a2540; color: #b5502f; }
.g-cover::after { background: repeating-linear-gradient(rgba(255,255,255,.28) 0 2px, transparent 2px 5px); }
.g-post { color: #b5502f; }
.g-post::before { height: 3px; } .g-post::after { top: 13px; height: 11px; right: 5px; background: #0a2540; border-radius: 1px; }
.shelf-item:hover .glyph { transform: translateY(-3px) rotate(-3deg); }

/* Create your own: a prompt, ready to type into */
main a.create { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center; margin-top: 36px; padding: 28px 30px; border-radius: 18px; background: var(--ink-gradient); color: #fff; text-decoration: none; }
main a.create:hover { color: #fff; }
.create-copy b { display: block; font-size: 21px; letter-spacing: -.014em; }
.create-copy span { display: block; font-size: 15px; color: rgba(255,255,255,.68); margin-top: 6px; line-height: 1.5; }
.create-field { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 10px 10px 10px 18px; min-width: 0; }
.create-typed { font-size: 14.5px; color: rgba(255,255,255,.92); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.create-caret { width: 2px; height: 20px; background: var(--brand-on-dark); flex: none; animation: caret 1.1s steps(1) infinite; }
.create-btn { margin-left: auto; flex: none; background: var(--brand-primary); color: #fff; font-weight: 600; font-size: 14.5px; padding: 10px 18px; border-radius: 8px; transition: background .2s ease; }
main a.create:hover .create-btn { background: var(--brand-primary-hover); }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .create-caret { animation: none; } .pg, .sl, .pp, .glyph { transition: none; } }

@media (max-width: 1024px) {
  .lib { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib-wide, .lib-doc:nth-child(2) { grid-column: span 2; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main a.create { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 768px) {
  .lib { grid-template-columns: 1fr; gap: 36px; }
  .lib-wide, .lib-doc:nth-child(2) { grid-column: auto; }
  .shelf { grid-template-columns: 1fr; }
  .create-typed { white-space: normal; font-size: 14px; }
}
