@font-face{
  font-family:"Nexa";
  src:url("../fonts/Nexa-Regular.woff2") format("woff2");
  font-weight:400 700;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"Nexa";
  src:url("../fonts/Nexa-Bold.woff2") format("woff2");
  font-weight:700 900;
  font-style:normal;
  font-display:swap;
}

:root{
  --bg:#090a0f;
  --panel:#11131a;
  --panel2:#171a23;
  --text:#f3efe7;
  --muted:#aaa39a;
  --line:rgba(255,255,255,.12);
  --soft:rgba(255,255,255,.07);
  --accent:#d8b36a;
  --accent2:#f0d99b;
  --shadow:0 24px 80px rgba(0,0,0,.38);
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  scroll-behavior:smooth;
  text-size-adjust:100%;
  -webkit-text-size-adjust:100%;
}

body{
  width:100%;
  max-width:100%;
  min-height:100vh;
  margin:0;
  overflow-x:hidden;
  background:var(--bg);
  color:var(--text);
  font-family:"Nexa", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a{
  color:inherit;
}

button,
input,
textarea,
select{
  font:inherit;
}

button{
  -webkit-tap-highlight-color:transparent;
}

img,
svg,
video,
canvas,
picture,
iframe{
  max-width:100%;
}

img,
svg,
video,
canvas,
picture{
  height:auto;
}

p,
li,
h1,
h2,
h3,
h4,
h5,
h6,
strong,
span,
small,
blockquote{
  overflow-wrap:anywhere;
}

pre,
code{
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.museum-shell{
  width:min(1180px, calc(100% - 32px));
  min-height:100vh;
  margin:0 auto;
  padding:34px 0 22px;
  display:flex;
  flex-direction:column;
  gap:20px;
}

.museum-hero{
  text-align:center;
  padding:18px 0 4px;
}

.facets-brand{
  min-width:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  line-height:1;
  color:var(--text);
}

.facets-brand h1{
  margin:0;
  text-transform:uppercase;
}

.facets-mark{
  width:clamp(42px, .72em, 76px);
  aspect-ratio:1 / 1;
  display:block;
  flex:0 0 auto;
  background:currentColor;
  -webkit-mask:url("../img/facets-logo.png") center / contain no-repeat;
  mask:url("../img/facets-logo.png") center / contain no-repeat;
  transform:translateY(-.08em);
}

.museum-hero h1{
  margin:0;
  font-size:clamp(48px, 9vw, 104px);
  line-height:.88;
  letter-spacing:-.075em;
  font-weight:820;
}

.museum-hero p{
  width:min(760px, 100%);
  margin:18px auto 0;
  color:var(--muted);
  font-size:clamp(16px, 2vw, 21px);
  line-height:1.5;
}

.museum-board{
  display:grid;
  grid-template-columns:minmax(260px, 340px) 1fr;
  gap:18px;
  align-items:stretch;
  min-height:520px;
}

.museum-tabs{
  position:sticky;
  top:18px;
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  align-content:start;
  align-self:stretch;
  width:auto;
  height:100%;
  min-height:100%;
  max-width:100%;
  max-height:none;
  overflow-x:hidden;
  overflow-y:auto;
  padding:2px 4px 4px 0;
}

.museum-tabs::-webkit-scrollbar{
  width:8px;
  height:8px;
}

.museum-tabs::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.16);
  border-radius:999px;
}

.museum-tab{
  width:100%;
  min-width:0;
  border:1px solid var(--line);
  border-radius:18px;
  padding:15px 16px;
  background:rgba(255,255,255,.045);
  color:var(--text);
  text-align:left;
  cursor:pointer;
  transition:background .16s ease, border-color .16s ease, transform .16s ease;
}

.museum-tab:hover{
  border-color:rgba(216,179,106,.45);
  background:rgba(255,255,255,.07);
}

.museum-tab:focus-visible,
.panel-nav-button:focus-visible,
.card-speak-button:focus-visible{
  outline:2px solid rgba(240,217,155,.82);
  outline-offset:3px;
}

.museum-tab.is-active{
  border-color:rgba(216,179,106,.72);
  background:linear-gradient(135deg, rgba(216,179,106,.18), rgba(255,255,255,.06));
}

.museum-tab span{
  display:block;
  font-weight:780;
  font-size:15px;
  letter-spacing:.01em;
}

.museum-tab small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.museum-panel{
  position:relative;
  align-self:stretch;
  overflow:hidden;
  min-width:0;
  min-height:520px;
  border:1px solid var(--line);
  border-radius:28px;
  padding:32px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.035)),
    var(--panel);
  box-shadow:var(--shadow);
}

.museum-panel:before{
  content:"";
  position:absolute;
  inset:auto -10% -35% 35%;
  height:320px;
  background:radial-gradient(circle, rgba(216,179,106,.12), transparent 62%);
  pointer-events:none;
}

.panel-head{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.panel-kicker{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:6px 10px;
  border:1px solid rgba(216,179,106,.35);
  border-radius:999px;
  color:var(--accent2);
  background:rgba(216,179,106,.09);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.card-speak-button{
  flex:0 0 auto;
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(216,179,106,.38);
  border-radius:999px;
  background:rgba(216,179,106,.08);
  color:var(--accent2);
  cursor:pointer;
  box-shadow:none;
  transition:background .16s ease, border-color .16s ease, transform .16s ease;
}

.card-speak-button:hover{
  transform:translateY(-1px);
  border-color:rgba(216,179,106,.65);
  background:rgba(216,179,106,.14);
}

.card-speak-button.is-speaking{
  border-color:rgba(240,217,155,.9);
  background:rgba(216,179,106,.2);
}

.card-speak-icon{
  width:21px;
  height:21px;
  display:block;
  fill:currentColor;
  stroke:currentColor;
  stroke-width:1.85;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.card-speak-icon path:not(:first-child){
  fill:none;
}

.museum-panel h2{
  position:relative;
  z-index:1;
  margin:18px 0 0;
  font-size:clamp(34px, 5vw, 62px);
  line-height:.95;
  letter-spacing:-.055em;
}

.panel-summary{
  position:relative;
  z-index:1;
  width:min(760px, 100%);
  margin:18px 0 0;
  color:#ddd5ca;
  font-size:18px;
  line-height:1.55;
}

.panel-points{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  margin:24px 0 0;
  padding:0;
  list-style:none;
}

.panel-points li{
  min-width:0;
  border:1px solid var(--line);
  border-radius:16px;
  padding:13px 14px;
  background:rgba(0,0,0,.18);
  color:#d7d0c8;
  line-height:1.45;
  font-size:14px;
}

.keeper{
  position:relative;
  z-index:1;
  margin-top:24px;
  padding:18px 20px;
  border-left:3px solid var(--accent);
  border-radius:16px;
  background:rgba(216,179,106,.09);
  color:#f3e2b8;
  font-weight:760;
  line-height:1.45;
}

.panel-nav{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  align-items:stretch;
  margin-top:18px;
}

.panel-nav:has(.panel-nav-button:only-child){
  grid-template-columns:1fr;
}

.panel-nav-button{
  width:100%;
  min-width:0;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px 15px;
  background:rgba(255,255,255,.045);
  color:var(--text);
  text-align:left;
  cursor:pointer;
  transition:background .16s ease, border-color .16s ease, transform .16s ease;
}

.panel-nav-button:hover{
  transform:translateY(-1px);
  border-color:rgba(216,179,106,.55);
  background:rgba(255,255,255,.07);
}

.panel-nav-button:first-child{
  text-align:left;
}

.panel-nav-button.is-next{
  text-align:right;
  border-color:rgba(216,179,106,.35);
}

.panel-nav-button span{
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.panel-nav-button strong{
  display:block;
  margin-top:5px;
  font-size:15px;
  line-height:1.25;
}

.panel-nav-spacer{
  display:none !important;
}

.museum-strip{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.museum-strip div{
  min-width:0;
  border:1px solid var(--line);
  border-radius:18px;
  padding:15px 16px;
  background:rgba(255,255,255,.045);
}

.museum-strip span{
  display:block;
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:800;
}

.museum-strip strong{
  display:block;
  margin-top:6px;
  font-size:16px;
}

.footer{
  margin-top:auto;
  padding:8px 0 0;
  color:var(--muted);
  text-align:center;
  font-size:13px;
}

.footer p{
  margin:0;
}

/* Tablet and desktop keep the vertical category stack beside the panel */
@media (min-width:721px){
  .museum-board{
    grid-template-columns:minmax(260px, 340px) 1fr;
    align-items:stretch;
  }

  .museum-tabs{
    position:sticky;
    top:18px;
    display:grid;
    grid-template-columns:1fr;
    flex-direction:initial;
    flex-wrap:initial;
    width:auto;
    height:100%;
    min-height:100%;
    max-height:none;
    overflow-x:hidden;
    overflow-y:auto;
  }

  .museum-tab{
    flex:initial;
    width:100%;
    min-width:0;
    max-width:none;
  }

  .museum-panel{
    align-self:stretch;
  }

  .museum-strip{
    grid-template-columns:repeat(4, minmax(0, 1fr));
  }
}

/* Medium tablet keeps side by side, only tightens the rail */
@media (max-width:980px) and (min-width:721px){
  .museum-shell{
    width:min(100% - 28px, 920px);
    padding-top:26px;
  }

  .museum-board{
    grid-template-columns:minmax(230px, 300px) 1fr;
    gap:16px;
  }

  .museum-panel{
    padding:28px;
  }

  .panel-points{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .facets-mark{
    width:clamp(40px, .72em, 64px);
    transform:translateY(-.08em);
  }

  .museum-hero h1{
    font-size:clamp(56px, 8vw, 88px);
  }
}

/* Mobile uses one horizontal category row above the panel */
@media (max-width:720px){
  .museum-shell{
    width:min(100% - 24px, 720px);
    padding-top:24px;
  }

  .museum-board{
    grid-template-columns:1fr;
    gap:16px;
    min-height:0;
  }

  .museum-tabs{
    position:static;
    top:auto;
    display:flex;
    flex-direction:row;
    flex-wrap:nowrap;
    gap:10px;
    width:100%;
    height:auto;
    min-height:0;
    max-height:none;
    overflow-x:auto;
    overflow-y:hidden;
    padding:2px 2px 10px;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }

  .museum-tabs::-webkit-scrollbar{
    height:6px;
  }

  .museum-tabs::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.16);
    border-radius:999px;
  }

  .museum-tab{
    flex:0 0 clamp(210px, 72vw, 280px);
    width:auto;
    min-width:210px;
    max-width:280px;
    scroll-snap-align:start;
  }

  .museum-panel{
    width:100%;
    min-height:0;
    border-radius:26px;
    padding:24px;
  }

  .panel-points{
    grid-template-columns:1fr;
  }

  .panel-nav{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .panel-nav:has(.panel-nav-button:only-child){
    grid-template-columns:1fr;
  }

  .panel-nav-button:first-child{
    text-align:left;
  }

  .panel-nav-button.is-next{
    text-align:right;
  }

  .museum-strip{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .facets-mark{
    width:clamp(38px, .72em, 58px);
    transform:translateY(-.08em);
  }
}

/* Small phones keep the category row horizontal */
@media (max-width:560px){
  .museum-shell{
    width:min(100% - 20px, 520px);
  }

  .museum-hero{
    padding-top:10px;
  }

  .facets-brand{
    gap:10px;
  }

  .facets-mark{
    width:clamp(34px, .72em, 46px);
    transform:translateY(-.08em);
  }

  .museum-hero h1{
    font-size:58px;
  }

  .museum-hero p{
    font-size:16px;
  }

  .museum-panel{
    border-radius:24px;
    padding:22px;
  }

  .museum-panel h2{
    font-size:38px;
  }

  .panel-summary{
    font-size:16px;
  }

  .museum-tab{
    flex:0 0 82vw;
    min-width:230px;
    max-width:320px;
  }

  .museum-strip{
    grid-template-columns:1fr;
  }
}

@media (max-width:430px){
  .facets-mark{
    width:clamp(32px, .72em, 42px);
    transform:translateY(-.08em);
  }

  .museum-hero h1{
    font-size:clamp(46px, 15vw, 58px);
  }

  .museum-tab{
    flex:0 0 84vw;
    min-width:220px;
    max-width:320px;
  }

  .museum-panel{
    padding:20px;
  }

  .museum-panel h2{
    font-size:34px;
  }

  .card-speak-button{
    width:40px;
    height:40px;
  }

  .panel-nav{
    gap:10px;
  }

  .panel-nav-button{
    padding:13px 12px;
  }

  .panel-nav-button strong{
    font-size:14px;
  }
}

@media (prefers-reduced-motion:reduce){
  html{
    scroll-behavior:auto;
  }

  .museum-tab,
  .panel-nav-button,
  .card-speak-button{
    transition:none;
  }

  .museum-tab:hover,
  .panel-nav-button:hover,
  .card-speak-button:hover{
    transform:none;
  }
}