@font-face {
  font-family: Baskervville;
  src: url("fonts/baskervville-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #faf1dd;
  --surface: #fffbf1;
  --ink: #35251d;
  --muted: #6f604f;
  --line: #ddcbaa;
  --light: #f3e6cd;
  --teal: #541724;
  --green: #772737;
  --wine: #590f1b;
  --gilt: #a57b36;
  --gold-light: #eed099;
  --cream: #fff3d6;
  --display: Baskervville, Georgia, "Noto Serif CJK JP", "Songti SC", "Yu Mincho", SimSun, serif;
  --margin: clamp(12px, 2.8vw, 46px);
}
body {
  background: radial-gradient(ellipse at 50% 12%, #fff6df 0%, transparent 62%),
              linear-gradient(90deg, #f5e8cd, var(--paper) 13% 87%, #f5e8cd);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.gallery-header { position: relative; z-index: 2; }
.gallery-mast {
  color: var(--cream);
  background: radial-gradient(ellipse at 50% 0%, #811f2b, transparent 75%), var(--wine);
  border-bottom: 3px double #d4ac60;
}
.mast-inner, .gallery-nav, .gallery-content { max-width: 1440px; margin-inline: auto; }
.mast-inner {
  min-height: 78px; padding: 6px var(--margin); display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: clamp(12px,2.6vw,44px); align-items: center;
  grid-template-areas: "account brand language";
}
.gallery-brand { grid-area: brand; gap: 12px; color: var(--cream); font: 600 clamp(33px,4.55vw,68px)/1 var(--display); font-variant-numeric: lining-nums; letter-spacing: -.037em; }
.gallery-brand b { color: inherit; font-weight: inherit; }
.gallery-brand .mark { width: clamp(43px,4.9vw,70px); height: auto; filter: drop-shadow(0 2px 1px #320a10); }
.mast-rule, .mast-start, .mast-end { min-width: 0; display: flex; align-items: center; }
.mast-rule { flex: 1; gap: 8px; color: #ddba75; }
.mast-rule::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg,#bf934b,#f0d492); }
.mast-rule i { font: normal 31px/1 Georgia, serif; }
.mast-start, .mast-end { gap: clamp(7px,1.3vw,20px); }
.mast-start { grid-area: account; }
.mast-end { grid-area: language; }
.mast-end .mast-rule { transform: rotate(180deg); }
.mast-language { position: relative; }
.mast-language summary { display: flex; align-items: center; justify-content: center; gap: .5em; list-style: none; }
.gallery-header summary::-webkit-details-marker { display: none; }
.gallery-header summary::after {
  content: ""; width: .38em; height: .38em; border: solid currentColor; border-width: 0 1px 1px 0;
  transform: translateY(-.12em) rotate(45deg);
}
.gallery-header details[open] > summary::after { transform: translateY(.12em) rotate(225deg); }
.mast-language { z-index: 3; }
.mast-language summary { min-height: 36px; font-size: 12px; color: #ffebc0; white-space: nowrap; }
.mast-language .language-switch {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 4; padding: 6px;
  background: var(--surface); border: 1px solid #b59660; border-radius: 3px;
  box-shadow: 0 7px 20px #3f251c28;
}
.mast-language .language-switch { display: grid; min-width: 110px; }
.language-switch { background: #f6ecd9; border: 1px solid var(--line); }
.language-switch button { color: var(--ink); }
.mast-language .language-switch button { min-height: 36px; text-align: start; padding-inline: 12px; }
.language-switch button[aria-pressed=true] { color: var(--cream); background: var(--wine); box-shadow: none; }
.gallery-nav-strip { display: flex; align-items: center; background: #fcf1da; border-bottom: 1px solid #d7bf90; }
.gallery-nav {
  flex: 0 1 1180px; min-width: 0; padding: 5px var(--margin); display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr)); gap: 2px clamp(3px,.6vw,9px);
}
.gallery-nav-strip::before, .gallery-nav-strip::after {
  content: ""; flex: 1; height: 1px; background: linear-gradient(90deg,transparent,#b48c4b);
}
.gallery-nav-strip::after { transform: rotate(180deg); }
.gallery-nav-link {
  display: flex; align-items: center; justify-content: center; justify-self: center; max-width: 100%;
  min-height: 34px; padding: 4px clamp(5px,1vw,14px); color: #492721;
  font: 600 clamp(14px,1.26vw,19px)/1.25 var(--display); text-align: center; text-wrap: balance;
  border: 1px solid transparent; border-radius: 3px;
}
.gallery-nav-link:hover { background: #f4e4c4; text-decoration: none; }
.gallery-nav-link[aria-current] {
  color: var(--cream); background: var(--wine); border-color: #935932;
  box-shadow: inset 0 0 0 2px var(--wine), inset 0 0 0 3px #b79053;
}
.gallery-account { display: flex; min-width: 0; align-items: center; gap: 10px; font-size: 12px; }
.gallery-account span { color: var(--gold-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-account button { min-height: 30px; padding: 2px 0; border: 0; color: var(--cream); background: transparent; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.gallery-content { width: 100%; padding: 0 var(--margin) 42px; }
.pagehead h1, .msg h1, .logincard h2, .panel h2, .metric strong { font-family: var(--display); color: var(--teal); }
.pagehead h1, .logincard h2 { letter-spacing: -.035em; }
.panel, .metric { border-radius: 4px; background: var(--surface); }
.panel h2 { font-size: 21px; }
.metric strong { font-variant-numeric: lining-nums tabular-nums; }
.mainmetric { background: var(--wine); border-color: #81512d; }
.mainmetric span, .mainmetric small, .mainmetric strong { color: var(--cream); }
.btn, .smallbtn, input:not([type=checkbox]), select, textarea { border-color: #c8b696; }
.btn, .smallbtn { background: var(--surface); }
.btn:hover, .smallbtn:hover { background: var(--light); }
.btn.primary { background: var(--wine); border-color: var(--wine); color: var(--cream); }
.btn.primary:hover { background: #742235; }
.opline, th, td { border-bottom-color: #e6d9be; }
th, .bulk, .shared-preview, .numbers code, .run-creator .notebook-source { background: #f8efdf; }
.notice, .tag, .case-tags a { background: #efe3ce; }
.tag, .case-tags a { color: #64333b; }
.case-tile { border-color: var(--line); background: var(--surface); }
.case-tile:hover, .case-tile:focus-within { background: #f6ead1; border-color: #b09164; }
.case-tile:has(input:checked) { background: #f1dfcf; border-color: #9a6467; }
.case-id { color: var(--teal); }
.loginart {
  background: radial-gradient(ellipse at 32% 36%, #872934, transparent 70%), var(--wine);
  color: var(--cream);
}
.loginart::before {
  content: ""; position: absolute; inset: 14px; border: 3px double #c9a366; pointer-events: none;
}
.loginart .brand, .loginart h1 { font-family: var(--display); }
.loginart .brand b, .loginart h1 em, .artsub, .artcaption { color: var(--gold-light); }
.arith i { color: var(--cream); border-color: #c39c5a; }
.arith i:nth-child(2), .arith i:nth-child(3) { color: var(--gold-light); background: #792231; }
.logincard { width: min(100%,435px); padding: clamp(20px,3vw,40px); border: 1px solid #c3a570; background: var(--surface); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 5px var(--line); }
.logincard .eyebrow { margin-top: 0; }
.public-languages { z-index: 3; }
.public-languages .language-switch { padding: 3px; }

@media (min-width: 541px) and (max-width: 780px) {
  .gallery-nav { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .mast-inner { min-height: 63px; gap: 8px; }
  .gallery-brand { gap: 5px; }
  .gallery-brand .mark { width: 39px; }
  .mast-rule i { font-size: 21px; }
  .mast-end { justify-content: flex-end; }
  .mast-end .mast-rule { display: none; }
  .public-languages { top: 16px; right: 17px; }
  .public-languages .language-switch button { font-size: 11px; }
  .loginart::before { inset: 7px; }
  .loginart { padding: 24px 20px 18px; }
  .loginart .arith { bottom: 26px; top: auto; right: 24px; }
  .loginart h1 { max-width: calc(100% - 96px); }
  .loginart h1 br { display: initial; }
}
@media (max-width: 540px) {
  .mast-inner { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "brand brand" "account language"; gap: 0 8px; padding-block: 6px 2px; }
  .gallery-brand { justify-self: center; }
  .mast-start .mast-rule { display: none; }
  .mast-language summary, .gallery-account button { min-height: 27px; }
  .gallery-nav { grid-template-columns: repeat(2,minmax(0,1fr)); padding-block: 3px; }
  .gallery-nav-link { justify-self: stretch; padding-inline: 3px; }
  .gallery-nav-link:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; }
}
@media (max-width: 460px) {
  .case-grid { gap: 3px; }
  .case-grid.standard { min-width: 260px; }
  .case-tile { padding: 4px 3px; }
  .loginart .brand { font-size: 16px; gap: 5px; }
  .loginart .brand .mark { width: 28px; height: 28px; }
}
