/* ARKHIVE — interactive E prototype styles (responsive) */

.app { background: var(--white); color: var(--ink); font-family: var(--font-body); min-height: 100vh; }

/* ---- hero ---- */
.e-hero { position: relative; min-height: 490px; overflow: hidden; color: #fff; }
.e-hero .h1 { font-size: clamp(48px, 9vw, 124px); margin: 14px 0 0; }
.e-hero .heroPad { position: absolute; left: 0; right: 0; top: 150px; padding: 0 clamp(20px, 4vw, 56px); z-index: 2; }
@media (max-width: 720px) { .e-hero .heroPad { top: 118px; } .e-hero { min-height: 460px; } }

/* ---- masthead ---- */
.e-mast { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 clamp(20px, 4vw, 56px); }
.e-mast .logo { font-family: var(--font-display); font-weight: 900; font-size: 26px; letter-spacing: -0.01em; }
.e-mast nav { display: flex; gap: 22px; }
.e-mast nav a { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: #fff; opacity: 0.78; }
.e-mast nav a:hover { opacity: 1; }
@media (max-width: 860px) { .e-mast nav { display: none; } }

/* merged auth cluster — signup prompt + prominent login button */
.mast-join { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; line-height: 1.2; text-decoration: none; }
.mast-join .q { font-family: var(--font-body); font-size: 11px; color: rgba(255,255,255,0.5); }
.mast-join .a { font-family: var(--font-body); font-weight: 700; font-size: 12.5px; color: #fff; border-bottom: 1.5px solid transparent; padding-bottom: 1px; transition: border-color .15s, color .15s; }
.mast-join .a i { font-style: normal; color: var(--red); }
.mast-join:hover .a { border-color: var(--red); }
.mast-login { padding: 12px 26px; font-size: 14.5px; font-weight: 700; }
@media (max-width: 560px) {
  .mast-join .q { display: none; }
  .mast-login { padding: 11px 18px; font-size: 13.5px; }
}

/* ---- shell ---- */
.e-shell { display: grid; grid-template-columns: 304px 1fr; align-items: start; max-width: 1440px; margin: 0 auto; }
.e-spine {
  background: var(--dark); color: #fff; padding: 30px 24px 36px;
  align-self: stretch; position: sticky; top: 0; max-height: 100vh; overflow-y: auto;
}
.e-content { background: var(--white); padding: 26px clamp(20px, 3.4vw, 44px) 56px; min-width: 0; }
@media (max-width: 900px) {
  .e-shell { grid-template-columns: 1fr; }
  .e-spine { display: none; }
}

/* spine facets */
.e-facet { display: flex; align-items: center; gap: 10px; padding: 9px 0; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.07); user-select: none; }
.e-check { width: 15px; height: 15px; border: 1px solid rgba(255,255,255,0.35); border-radius: 2px; display: flex; align-items: center; justify-content: center; flex: none; transition: all .12s; }
.e-check.on { background: var(--red); border-color: var(--red); }
.e-check.on::after { content: "✓"; color: #fff; font-size: 10px; line-height: 1; }
.e-catrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; user-select: none; }
.e-catrow:hover .e-catlabel { color: #fff; }
.e-catlabel { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: rgba(255,255,255,0.62); flex: 1; transition: color .12s; }
.e-catrow.on .e-catlabel { color: #fff; }
.e-bar { width: 56px; height: 3px; background: rgba(255,255,255,0.1); position: relative; }
.e-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,0.4); }
.e-catrow.on .e-bar i { background: var(--red); }
.e-spinelabel { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: rgba(255,255,255,0.5); }

/* year selects */
.e-year { display: flex; align-items: center; gap: 8px; }
.e-sel { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18); color: #fff; font-family: var(--font-mono); font-size: 12px; padding: 8px 10px; border-radius: var(--radius); cursor: pointer; }
.e-sel:focus { outline: 1px solid var(--red); }

/* ---- toolbar ---- */
.e-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); flex-wrap: wrap; }
.e-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- result grid ---- */
.e-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--col-min), 1fr)); gap: calc(20px * var(--gap)); }
.e-card { border: 1px solid rgba(28,28,30,0.12); border-radius: var(--radius); overflow: hidden; background: #fff; cursor: pointer; transition: box-shadow .18s, transform .18s, border-color .18s; }
.e-card:hover { box-shadow: 0 8px 28px rgba(28,28,30,0.12); transform: translateY(-3px); border-color: rgba(28,28,30,0.22); }
.e-cardbody { padding: 12px 13px 13px; }

/* ---- list view ---- */
.e-list { display: flex; flex-direction: column; }
.e-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center; padding: 12px 6px; border-bottom: 1px solid rgba(28,28,30,0.1); cursor: pointer; transition: background .12s; }
.e-row:hover { background: var(--off); }
.e-row .thumb { width: 92px; height: 60px; border-radius: var(--radius); overflow: hidden; }
@media (max-width: 620px) { .e-row { grid-template-columns: 64px 1fr; } .e-row .rowmeta { display: none; } .e-row .thumb { width: 64px; height: 44px; } }

/* ---- mobile filter bar ---- */
.e-mobilebar { display: none; position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid rgba(28,28,30,0.1); padding: 12px clamp(20px,3.4vw,44px); gap: 10px; align-items: center; }
@media (max-width: 900px) { .e-mobilebar { display: flex; } }
.e-fbtn { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; padding: 11px 16px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--ink); color: #fff; cursor: pointer; display: flex; gap: 8px; align-items: center; }

/* drawer */
.e-drawer-wrap { position: fixed; inset: 0; z-index: 60; display: none; }
.e-drawer-wrap.open { display: block; }
.e-drawer-scrim { position: absolute; inset: 0; background: rgba(28,28,30,0.6); opacity: 0; transition: opacity .25s; }
.e-drawer-wrap.open .e-drawer-scrim { opacity: 1; }
.e-drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 86vw); background: var(--dark); color: #fff; padding: 24px 24px 32px; overflow-y: auto; transform: translateX(-100%); transition: transform .28s cubic-bezier(.3,.7,.2,1); }
.e-drawer-wrap.open .e-drawer { transform: translateX(0); }

/* ---- detail modal ---- */
.e-modal-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: clamp(16px, 4vw, 48px); }
.e-modal-scrim { position: absolute; inset: 0; background: rgba(20,20,22,0.78); backdrop-filter: blur(3px); animation: e-fade .2s ease; }
.e-modal { position: relative; z-index: 1; background: var(--white); border-radius: var(--radius); width: min(1000px, 100%); max-height: 90vh; overflow: hidden; display: grid; grid-template-columns: 1.15fr 0.85fr; box-shadow: 0 30px 90px rgba(0,0,0,0.5); animation: e-pop .22s cubic-bezier(.3,.8,.3,1); }
.e-modal .pane-r { overflow-y: auto; max-height: 90vh; padding: 30px 32px 34px; }
@media (max-width: 760px) { .e-modal { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; } .e-modal .pane-r { max-height: none; } }
@keyframes e-fade { from { opacity: 0; } }
@keyframes e-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.e-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(0,0,0,0.5); color: #fff; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.e-close:hover { background: rgba(0,0,0,0.75); }

/* trust grade card in modal */
.e-grade { border: 1px solid; border-radius: var(--radius); padding: 14px 15px; }
.e-grade.green  { background: var(--tg-fill); border-color: var(--tg-line); }
.e-grade.yellow { background: var(--ty-fill); border-color: var(--ty-line); }
.e-grade.red    { background: var(--tr-fill); border-color: var(--tr-line); }
.e-grade .gname { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; }
.e-grade.green  .gname { color: var(--tg-head); }
.e-grade.yellow .gname { color: var(--ty-head); }
.e-grade.red    .gname { color: var(--tr-head); }

/* license rows */
.e-lic { border: 1px solid rgba(28,28,30,0.14); border-radius: var(--radius); padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.e-lic.locked { background: var(--off); }
.e-pill { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; padding: 3px 7px; border-radius: 999px; border: 1px solid currentColor; }

/* empty state */
.e-empty { text-align: center; padding: 80px 20px; color: var(--stone); }

/* ---- numbered pagination ---- */
.e-pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.e-pagebtn { min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid rgba(28,28,30,0.16); background: #fff; border-radius: var(--radius); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; cursor: pointer; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; transition: all .14s; }
.e-pagebtn:hover:not(:disabled) { border-color: var(--ink); }
.e-pagebtn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.e-pagebtn:disabled { opacity: 0.38; cursor: default; }
.e-pageellipsis { font-family: var(--font-mono); color: var(--stone); padding: 0 2px; }
.e-pageinfo { text-align: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--stone); margin-top: 14px; }

/* hide scrollbar prettily on spine */
.e-spine::-webkit-scrollbar, .e-drawer::-webkit-scrollbar, .pane-r::-webkit-scrollbar { width: 8px; }
.e-spine::-webkit-scrollbar-thumb, .e-drawer::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 8px; }
.pane-r::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.16); border-radius: 8px; }
