/* ==========================================================
   keeplee - the Inventory page: a rack in the hero, stock between
   what goes in and out, hanging tags, a chain, a clipboard.
   ========================================================== */
.iv-hero { padding: calc(72px + var(--under, 0px)) 0 72px; background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%); text-align: center; overflow: hidden; }
.iv-copy { max-width: 900px; }
.iv-kicker { margin: 0 0 16px; font-weight: 600; color: var(--brand); }
.iv-kicker a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.iv-hero h1 { margin: 0 0 20px; font-size: clamp(2.2rem, 5.6vw, 4rem); line-height: 1.06; letter-spacing: -.03em; text-wrap: balance; }
.iv-hero h1 span { color: var(--accent-600); }
.iv-hero .lead { max-width: 36em; margin: 0 auto 30px; }

/* The rack */
.iv-rack { max-width: 880px; margin: 56px auto 0; padding: 0 14px; border-inline: 8px solid var(--navy); border-radius: 4px; }
.iv-shelf { display: flex; align-items: flex-end; justify-content: center; gap: 10px; min-height: 104px; padding: 14px 4px 0; border-bottom: 10px solid var(--navy); }
.iv-box { flex: 1 1 0; max-width: 220px; display: grid; gap: 2px; padding: 12px 8px; border-radius: 8px 8px 2px 2px; text-align: center; animation: ivDrop .6s var(--ease) var(--d, 0ms) both; }
.iv-box b { font-size: clamp(1.05rem, 2.6vw, 1.45rem); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.iv-box span { font-size: clamp(.72rem, 1.6vw, .84rem); line-height: 1.2; font-weight: 600; }
.iv-a { background: var(--brand); color: #fff; }
.iv-b { background: var(--brand-50); color: var(--navy); border: 1px solid #ecd9cc; }
.iv-c { background: var(--navy-2); color: #fff; }
.iv-low { background: #fdecec; color: #8f1818; border: 2px solid #dc2626; }
@keyframes ivDrop { from { opacity: 0; transform: translateY(-22px); } to { opacity: 1; transform: none; } }
.iv-fine { margin-top: 14px; }

.iv-head { max-width: 780px; margin: 0 auto 44px; text-align: center; }
.iv-head h2 { margin: 8px 0 14px; font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.16; text-wrap: balance; }
.iv-head .lead { margin: 0 auto; }

/* In and out */
.iv-flow { padding: 88px 0; background: #fff; }
.iv-mid { display: grid; gap: 36px; align-items: center; max-width: 1040px; margin: 0 auto; }
.iv-col { display: grid; gap: 10px; text-align: center; }
.iv-col h3 { margin: 0 0 4px; font-size: .86rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.iv-col p { display: grid; gap: 2px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.iv-col strong { color: var(--navy); }
.iv-col span { color: var(--muted); font-size: .9rem; line-height: 1.35; }
.iv-core { justify-self: center; display: grid; justify-items: center; align-content: center; gap: 4px; width: 210px; height: 210px; padding: 20px; border-radius: 50%; background: var(--navy); color: #fff; text-align: center; box-shadow: 0 0 0 12px var(--brand-50); }
.iv-core .ico { width: 28px; height: 28px; }
.iv-core strong { font-size: 1.2rem; }
.iv-core small { color: #cfccc2; line-height: 1.3; }
.iv-inside { display: grid; gap: 12px; max-width: 1040px; margin: 36px auto 0; }
.iv-inside p { margin: 0; padding: 16px 20px; border-radius: 14px; background: var(--brand-50); color: var(--ink); text-align: center; font-size: .96rem; }
.iv-inside strong { color: var(--navy); }
@media (min-width: 860px) {
  .iv-mid { grid-template-columns: 1fr 250px 1fr; gap: 36px; }
  .iv-col p { position: relative; }
  .iv-col:first-child p::after, .iv-col:last-child p::before { content: ""; position: absolute; top: 50%; width: 36px; border-top: 2px dashed #ecd9cc; }
  .iv-col:first-child p::after { right: -37px; }
  .iv-col:last-child p::before { left: -37px; }
  .iv-inside { grid-template-columns: 1fr 1fr; }
}

/* The tags */
.iv-tags-sec { padding: 88px 0; background: var(--bg-soft); }
.iv-tags { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.iv-tags li { position: relative; padding: 40px 22px 24px; border: 1px solid var(--line); border-radius: 14px 14px 22px 22px; background: #fff; text-align: center; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); transform-origin: top center; }
.iv-tags li::before { content: ""; position: absolute; left: 50%; top: 13px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--bg-soft); border: 2px solid var(--brand); }
.iv-tags li:hover { transform: rotate(-1.4deg); box-shadow: var(--shadow); }
.iv-tags h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--navy); }
.iv-tags p { margin: 0; color: var(--muted); font-size: .95rem; }
.iv-more { list-style: none; max-width: 960px; margin: 36px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.iv-more li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--navy); font-size: .88rem; font-weight: 600; }
@media (min-width: 640px) { .iv-tags { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1020px) { .iv-tags { grid-template-columns: repeat(4, 1fr); } }

/* The summary */
.iv-shot-sec { padding: 88px 0; background: #fff; }
.iv-shot { max-width: 1040px; margin: 0 auto; text-align: center; }
.iv-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.iv-shot figcaption { margin-top: 14px; }

/* The chain */
.iv-chain-sec { padding: 88px 0; background: radial-gradient(900px 420px at 50% 110%, var(--navy-2), var(--navy) 70%); color: #fff; }
.iv-chain-sec h2 { color: #fff; }
.iv-chain-sec .lead { color: #cfccc2; }
.iv-chain-sec .lead a, .iv-flag a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.iv-chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.iv-chain li { position: relative; padding: 22px; border: 2px solid rgba(255,255,255,.28); border-radius: 22px; text-align: center; }
.iv-chain li:not(:last-child)::after { content: ""; position: absolute; left: 50%; bottom: -24px; width: 14px; height: 26px; margin-left: -7px; border: 2px solid rgba(255,255,255,.5); border-radius: 8px; background: var(--navy); }
.iv-chain h3 { margin: 0 0 6px; color: #fff; font-size: 1.05rem; }
.iv-chain p { margin: 0; color: #cfccc2; font-size: .93rem; }
.iv-flag { margin: 32px auto 0; max-width: 44em; color: #cfccc2; text-align: center; font-size: .95rem; }
@media (min-width: 960px) {
  .iv-chain { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .iv-chain li:not(:last-child)::after { left: auto; right: -20px; bottom: auto; top: 50%; width: 26px; height: 14px; margin: -7px 0 0; }
}

/* The clipboard */
.iv-story { padding: 88px 0; background: var(--warm-bg); }
.p-madeup { max-width: 640px; margin: 18px auto 0; padding: 12px 16px; border: 1px dashed var(--accent); border-radius: 14px; background: #fff; color: var(--warm-ink); font-size: .94rem; }
.iv-clip { position: relative; max-width: 740px; margin: 0 auto; padding: 36px clamp(18px, 4vw, 34px) 28px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-lg); }
.iv-clip::before { content: ""; position: absolute; left: 50%; top: -12px; width: 110px; height: 26px; margin-left: -55px; border-radius: 8px; background: var(--navy); }
.iv-clip-top { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 12px; color: var(--navy); }
.iv-clip-top span { color: var(--muted); font-size: .9rem; }
.iv-clip table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.iv-clip th, .iv-clip td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.iv-clip th:first-child { text-align: left; color: var(--navy); font-weight: 600; }
.iv-clip thead th { color: var(--muted); font-size: .78rem; font-weight: 600; }
.iv-clip td { color: var(--ink); }
.iv-clip .less { color: #a11b1b; font-weight: 600; }
.iv-clip .more { color: #0b6b47; font-weight: 600; }
.iv-clip .same { color: var(--muted); }
.iv-note { margin: 18px 0 0; color: var(--muted); line-height: 1.6; }

@media (max-width: 639px) {
  .iv-hero { padding-top: calc(48px + var(--under, 0px)); padding-bottom: 56px; }
  .iv-flow, .iv-tags-sec, .iv-shot-sec, .iv-chain-sec, .iv-story { padding-top: 60px; padding-bottom: 60px; }
  .iv-rack { margin-top: 44px; padding: 0 6px; border-inline-width: 6px; }
  .iv-shelf { gap: 5px; min-height: 92px; padding: 10px 2px 0; border-bottom-width: 8px; }
  .iv-box { padding: 10px 3px; }
  .iv-clip th, .iv-clip td { padding: 9px 3px; font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) {
  .iv-box { animation: none; }
  .iv-tags li { transition: none; }
  .iv-tags li:hover { transform: none; }
}
