:root {
  --ink: #1f281f;
  --muted: #6f756c;
  --paper: #f3eee5;
  --paper-deep: #e6ded0;
  --line: rgba(31, 40, 31, 0.16);
  --acid: #c6f05a;
  --orange: #ed6f43;
  --white: #fffdf8;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, textarea { font: inherit; }
button { color: inherit; }
.shell { width: min(1440px, 100%); margin: 0 auto; padding: 0 5vw; }

.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 12px; font: 700 13px/1 "DM Mono", monospace; letter-spacing: .18em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ink); border-radius: 50%; font-family: "Playfair Display", serif; font-size: 17px; }
.system-state { font: 500 10px/1 "DM Mono", monospace; letter-spacing: .12em; display: flex; align-items: center; gap: 9px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #5b9746; box-shadow: 0 0 0 5px rgba(91,151,70,.12); }

.hero { min-height: 550px; padding: 104px 0 90px; position: relative; border-bottom: 1px solid var(--line); }
.hero::after { content: ""; position: absolute; right: 3%; top: 70px; width: 280px; height: 280px; border: 1px solid var(--line); border-radius: 50%; box-shadow: inset 0 0 0 46px var(--paper), inset 0 0 0 47px var(--line), inset 0 0 0 95px var(--paper), inset 0 0 0 96px var(--line); opacity: .7; pointer-events: none; }
.eyebrow { font: 500 10px/1.2 "DM Mono", monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
h1 { max-width: 1000px; margin: 24px 0; font: 600 clamp(52px, 7.6vw, 108px)/.92 "Playfair Display", serif; letter-spacing: -.055em; position: relative; z-index: 1; }
h1 em { color: var(--orange); font-weight: 600; }
.hero > p { max-width: 550px; color: var(--muted); font-size: 17px; line-height: 1.7; margin: 0 0 35px; }
.primary-button { min-width: 205px; border: 0; background: var(--ink); color: var(--white); padding: 17px 18px; display: inline-flex; align-items: center; justify-content: space-between; gap: 30px; cursor: pointer; font-weight: 600; transition: transform .2s, background .2s; }
.primary-button:hover { transform: translateY(-2px); background: #354236; }
.primary-button b { color: var(--acid); font-size: 18px; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.metrics article { min-height: 155px; padding: 28px 26px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.metrics article:first-child { padding-left: 0; }
.metrics article:last-child { border-right: 0; }
.metrics span, .metrics small { color: var(--muted); font: 500 10px/1.4 "DM Mono", monospace; text-transform: uppercase; letter-spacing: .1em; }
.metrics strong { font: 600 43px/1 "Playfair Display", serif; margin: auto 0 8px; letter-spacing: -.04em; }
.metric-visual { justify-content: flex-end; }
#type-bars { height: 58px; display: flex; align-items: flex-end; gap: 5px; margin-bottom: 12px; }
#type-bars i { flex: 1; min-width: 12px; background: var(--ink); opacity: .82; animation: rise .55s ease both; }
@keyframes rise { from { height: 0 !important; } }

.library { padding: 96px 0 110px; min-height: 520px; }
.section-heading { display: flex; justify-content: space-between; gap: 30px; align-items: flex-end; margin-bottom: 38px; }
h2 { font: 600 clamp(35px, 4vw, 55px)/1 "Playfair Display", serif; letter-spacing: -.035em; margin: 13px 0 0; }
.search { width: min(330px, 100%); display: flex; gap: 10px; border-bottom: 1px solid var(--ink); padding: 10px 2px; }
.search input { width: 100%; border: 0; background: transparent; outline: none; color: var(--ink); }
.search input::placeholder { color: #93978f; }

.asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.asset-card { min-width: 0; background: var(--paper); padding: 24px; min-height: 255px; display: flex; flex-direction: column; transition: background .2s; }
.asset-card:hover { background: var(--white); }
.asset-top { display: flex; justify-content: space-between; gap: 15px; }
.file-badge { width: 54px; height: 67px; padding: 9px 7px; background: var(--ink); color: var(--acid); font: 500 9px/1 "DM Mono", monospace; display: flex; align-items: flex-end; clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%); }
.delete-button { width: 34px; height: 34px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; border-radius: 50%; opacity: 0; transition: opacity .2s, border-color .2s; }
.asset-card:hover .delete-button, .delete-button:focus { opacity: 1; }
.delete-button:hover { border-color: var(--line); color: var(--orange); }
.asset-card h3 { margin: 30px 0 8px; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-card p { color: var(--muted); font-size: 12px; line-height: 1.6; min-height: 38px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asset-meta { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font: 500 9px/1 "DM Mono", monospace; color: var(--muted); text-transform: uppercase; }
.download-link { color: var(--ink); text-decoration: none; font-size: 16px; }
.empty-state { padding: 80px 20px; text-align: center; border: 1px solid var(--line); }
.empty-orbit { width: 88px; height: 88px; margin: 0 auto 25px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; }
.empty-orbit span { display: grid; place-items: center; width: 45px; height: 45px; background: var(--acid); border-radius: 50%; font-size: 25px; }
.empty-state h3 { font: 600 30px/1.2 "Playfair Display", serif; margin: 0 0 10px; }
.empty-state p { max-width: 500px; margin: 0 auto 20px; color: var(--muted); line-height: 1.6; }
.text-button { border: 0; padding: 8px 0; border-bottom: 1px solid var(--ink); background: transparent; cursor: pointer; }

footer { padding: 30px 0 45px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font: 500 9px/1 "DM Mono", monospace; letter-spacing: .12em; }

dialog { width: min(600px, calc(100% - 32px)); border: 0; padding: 0; background: var(--white); color: var(--ink); box-shadow: 0 30px 100px rgba(22,30,22,.3); }
dialog::backdrop { background: rgba(28, 35, 28, .62); backdrop-filter: blur(5px); }
#upload-form { padding: 36px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
.icon-button { border: 0; background: transparent; font-size: 31px; font-weight: 300; cursor: pointer; }
.drop-zone { display: flex; min-height: 210px; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #a1a497; background: var(--paper); cursor: pointer; transition: border-color .2s, background .2s; }
.drop-zone.dragging { background: #edf7d4; border-color: var(--ink); }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
.upload-icon { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 17px; background: var(--acid); font-size: 24px; }
.drop-zone small { color: var(--muted); margin-top: 7px; }
.field { display: block; margin: 24px 0; }
.field > span { display: flex; justify-content: space-between; margin-bottom: 9px; font-size: 12px; font-weight: 600; }
.field i { color: var(--muted); font-weight: 400; font-style: normal; }
.field textarea { width: 100%; resize: vertical; border: 1px solid var(--line); padding: 13px; background: transparent; outline: none; }
.field textarea:focus { border-color: var(--ink); }
.submit-button { width: 100%; }
.form-message { min-height: 20px; color: var(--orange); font-size: 12px; margin-bottom: 8px; }
.toast { position: fixed; z-index: 4; right: 24px; bottom: 24px; padding: 14px 18px; background: var(--ink); color: var(--white); transform: translateY(90px); opacity: 0; transition: .25s; box-shadow: 0 10px 35px rgba(0,0,0,.2); }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 900px) {
  .hero::after { width: 190px; height: 190px; opacity: .35; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics article:nth-child(2) { border-right: 0; }
  .metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metrics article:nth-child(3) { padding-left: 0; }
  .asset-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .shell { padding: 0 20px; }
  .topbar { height: 72px; }
  .hero { padding: 75px 0 70px; min-height: 0; }
  h1 { font-size: 50px; }
  .hero::after { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics article { min-height: 130px; padding: 20px 14px; }
  .metrics strong { font-size: 34px; }
  .library { padding: 70px 0; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .asset-grid { grid-template-columns: 1fr; }
  .delete-button { opacity: 1; }
  footer { gap: 15px; flex-direction: column; }
  #upload-form { padding: 25px; }
}
