:root {
  color-scheme: light;
  --ink: #182b25;
  --deep: #15372e;
  --paper: #f8f8f1;
  --page-background: #e5e4cf;
  --soft: #edf1e7;
  --green: #265b45;
  --muted: #4e6258;
  --line: #cdd8cc;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--page-background);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font: 1rem/1.6 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green); text-underline-offset: .24em; text-decoration-thickness: .06em; }
a:hover { color: var(--deep); }
:focus-visible { outline: .18rem solid #317a56; outline-offset: .24rem; }
[hidden] { display: none !important; }
.shell { width: min(100% - 4rem, 72rem); margin-inline: auto; }
.skip-link { position: fixed; inset: .5rem auto auto .5rem; padding: .55rem .9rem; background: white; z-index: 3; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--deep); color: #f9fbef; }
.header-inner { min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; gap: .8rem; align-items: center; font-family: var(--serif); font-size: 1.25rem; text-decoration: none; color: inherit; }
.brand:hover { color: #dcf0db; }
.brand-note {
  width: 1.9rem; height: 1.16rem; display: grid; place-items: center; border: 1px solid #c9e5cf;
  border-radius: .16rem; flex: none;
}
.brand-note::before { content: ""; width: .52rem; height: .52rem; border: 1px solid #c9e5cf; border-radius: 50%; }
.languages { display: flex; flex: none; border: 1px solid #628276; border-radius: .35rem; overflow: hidden; }
.languages button {
  min-width: 2.65rem; min-height: 2.45rem; padding: .35rem .52rem; border: 0;
  background: transparent; color: #edf7ec; font-size: .875rem; font-weight: 700;
}
.languages button + button { border-left: 1px solid #628276; }
.languages [aria-pressed="true"] { background: #e9f0dc; color: var(--deep); }
.languages button:focus-visible { outline-color: #fff; outline-offset: -.22rem; }
.crumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: .62rem;
  font-size: .875rem; color: var(--muted); margin-top: 1.6rem;
}
.crumb a { font-weight: 600; }
.crumb:not([hidden]) + article .note-id { display: none; }
.note-header {
  padding: 1.65rem 0 1.55rem; display: flex; gap: 1.35rem;
  align-items: flex-end; justify-content: space-between;
}
.note-id {
  color: var(--green); font-size: .875rem; font-weight: 700; letter-spacing: .06em;
  margin: 0 0 .45rem; font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
h1 { margin: 0; font-size: clamp(2.45rem, 6vw, 4.65rem); line-height: .99; letter-spacing: -.042em; }
.note-subtitle {
  display: flex; align-items: center; gap: .62rem; color: var(--muted);
  margin: .76rem 0 0; font-size: 1.05rem;
}
.map-trigger {
  display: inline-flex; align-items: center; gap: .62rem; flex: none; min-height: 2.9rem;
  margin-bottom: .15rem; padding: .55rem 1rem; border: 1px solid #a9c0ad;
  background: var(--soft); border-radius: .35rem; color: var(--deep); font-weight: 650;
}
.map-trigger:hover { background: #e2ecdf; border-color: #759987; }
.pin {
  position: relative; width: .76rem; height: .76rem; margin-right: .05rem;
  border: .11rem solid currentColor; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg) translateY(-.08rem); flex: none;
}
.pin::after { content: ""; position: absolute; inset: .16rem; background: currentColor; border-radius: 50%; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.gallery figure { margin: 0; min-width: 0; }
.photo-button {
  overflow: hidden; position: relative; display: block; width: 100%; padding: 0; border: 0;
  border-radius: .45rem; background: transparent; text-align: left; cursor: zoom-in;
}
.photo-controls {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem;
  margin: 0 0 .78rem;
}
.view-switch {
  display: inline-flex; flex-wrap: wrap; align-items: stretch; padding: .18rem;
  border: 1px solid var(--line); border-radius: .42rem; background: var(--soft);
}
.view-switch button {
  min-height: 2.58rem; padding: .32rem .7rem; border: 0; border-radius: .28rem;
  color: var(--green); background: transparent; font-size: .9rem; font-weight: 650;
}
.view-switch button[aria-pressed="true"] { background: var(--deep); color: #fff; }
#reference-credit, #photo-status { margin: 0; color: var(--muted); font-size: .875rem; }
.face-photo-kind { font-size: .8125rem; color: var(--muted); }
.face-photo-kind:not([hidden]) { display: block; }
.photo-window { display: block; position: relative; width: 100%; aspect-ratio: 2 / 1; overflow: hidden; }
.photo-window img {
  position: absolute; width: 100%; height: auto; max-width: none; left: 0; top: 0;
  transform-origin: top left;
}
.specimen-mark {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-17deg);
  background: #fffdf3c2; color: #8a382e; padding: .14rem .42rem;
  font-size: clamp(.875rem, 2.1vw, 1.45rem); font-weight: 800; letter-spacing: .09em;
  pointer-events: none;
}
.photo-button:hover .photo-zoom-icon { background: #fff; }
.photo-zoom-icon {
  display: grid; place-items: center; position: absolute; right: .82rem; bottom: .82rem;
  width: 2.65rem; height: 2.65rem; border-radius: 50%; background: #fafcf1; color: var(--deep);
  box-shadow: 0 2px 12px #1a2b2260;
}
.photo-zoom-icon span {
  display: block; position: relative; border: 1.65px solid currentColor; width: .88rem; height: .88rem;
  border-radius: 50%; transform: translate(-.09rem, -.09rem);
}
.photo-zoom-icon span::before { content: "+"; position: absolute; inset: -.32rem 0 0 .09rem; font-size: .8rem; font-weight: 700; }
.photo-zoom-icon span::after { content: ""; position: absolute; width: .38rem; height: 1.65px; background: currentColor; left: .6rem; top: .64rem; transform: rotate(45deg); }
figcaption {
  display: flex; flex-wrap: wrap; gap: .1rem .7rem; padding: .68rem 0 .52rem;
  color: var(--muted); font-size: .96rem;
}
.face-label { color: var(--ink); font-weight: 700; }
.description-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2.9rem; align-items: start; }
.gallery + .description-grid { margin-top: 1.75rem; padding-top: 1.65rem; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.55rem, 3vw, 2.23rem); line-height: 1.17; margin: 0 0 .8rem; letter-spacing: -.025em; }
h3 { font-size: 1.25rem; line-height: 1.23; margin: 0 0 .35rem; }
.story > p, .look > p { margin: 0; }
.story > p { max-width: 68ch; }
.look { margin-top: 1.3rem; padding: .82rem 1rem; background: var(--soft); border-left: .2rem solid #84a38e; }
.specimen h2, .references h2 { font-size: 1.65rem; }
.specimen dl { margin: 0; }
.specimen dl div {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  gap: .25rem 1rem; padding: .52rem 0; border-bottom: 1px solid var(--line);
}
dt { font-size: .9375rem; color: var(--muted); }
dd { margin: 0; font-weight: 650; }
.serial { font-family: "Nirmala UI", "Noto Sans Devanagari", Mangal, var(--sans); font-size: 1.05rem; }
.note-end { margin-top: 2.05rem; padding-top: 1.55rem; border-top: 1px solid var(--line); }
.currency-grid { display: grid; grid-template-columns: minmax(9rem, 1fr) auto; column-gap: 1rem; align-items: center; max-width: 29rem; }
.field-label { grid-column: 1 / -1; font-size: .875rem; color: var(--muted); margin-bottom: .3rem; font-weight: 650; }
.select-shell { position: relative; }
.select-shell::after {
  content: ""; position: absolute; top: 42%; right: .9rem; width: .45rem; height: .45rem;
  border: solid var(--green); border-width: 0 .11rem .11rem 0; transform: rotate(45deg); pointer-events: none;
}
select {
  appearance: none; width: 100%; height: 2.85rem; color: var(--ink); background: #fff;
  border: 1px solid #a9c0ad; border-radius: .35rem; padding: .32rem 1.85rem .32rem .72rem;
}
#converted { font-family: var(--serif); font-weight: 600; font-size: 1.62rem; color: var(--deep); white-space: nowrap; }
.rate-attribution, .photo-credit { color: var(--muted); font-size: .875rem; }
.rate-attribution { display: grid; gap: .12rem; margin: .5rem 0 0; }
.references ul { margin: 0; padding-left: 1.15rem; }
.references li { margin-block: .32rem; }
.photo-credit { margin: .62rem 0 0; }
.note-footer { border-top: 1px solid var(--line); margin: 1.75rem 0 0; padding: 1rem 0 2rem; }
.back-button {
  display: inline-flex; align-items: center; min-height: 2.85rem; padding: .32rem .85rem;
  border: 1px solid #a9c0ad; border-radius: .35rem; background: var(--soft);
  color: var(--deep); font-weight: 650; text-decoration: none;
}
.back-button:hover { background: #e2ecdf; border-color: #759987; }
dialog {
  width: min(46rem, 100% - 1.6rem); max-height: calc(100dvh - 1.6rem); padding: 0;
  border: 1px solid #92a698; border-radius: .5rem; background: var(--paper); color: var(--ink);
}
dialog::backdrop { background: #14251fd2; }
.dialog-header {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .67rem .86rem .67rem 1rem; background: var(--deep); color: #fff;
}
.dialog-header h2 { margin: 0; font-size: 1.45rem; }
.icon-button {
  display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem;
  border: 1px solid #688578; border-radius: .28rem;
  background: #24483c; color: #fafffb; font-size: 1.35rem; line-height: 1;
}
.icon-button:hover { background: #3c5c50; }
.icon-button:focus-visible { outline-color: white; outline-offset: -.2rem; }
.icon-button:disabled { opacity: .48; cursor: default; }
.map-body { padding: .88rem 1rem 1.05rem; }
.map-body .view-switch { margin-bottom: .66rem; }
#region-map {
  display: block; width: 100%; aspect-ratio: 1.7; border: 1px solid #a7bbad;
  border-radius: .32rem; background: #e3edeb;
}
.map-body p { margin: .7rem 0; }
.map-credit { font-size: .875rem; color: var(--muted); }
.image-dialog { width: min(66rem, 100% - 1.3rem); }
.viewer-controls { display: flex; align-items: center; gap: .34rem; }
#zoom-value { text-align: center; min-width: 2.6rem; font-size: .875rem; }
.image-viewport {
  background: #21302a; max-height: calc(100dvh - 6rem); overflow: auto; overscroll-behavior: contain;
}
#viewer-frame { background: var(--paper); }
.home { padding-block: 2.6rem; }
.home h1 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); margin-bottom: 1.45rem; }
.preview-entry {
  display: grid; grid-template-rows: auto 1fr; min-width: 0;
  background: var(--soft); border: 1px solid var(--line);
  border-radius: .45rem; overflow: hidden; color: var(--ink); text-decoration: none;
}
.preview-entry:hover { border-color: #7c9b8b; background: #e6ede3; }
.preview-image { width: 100%; align-self: center; }
.preview-entry-text { align-self: center; display: grid; gap: .55rem; padding: 1rem 1.25rem; }
.preview-title { font: 1.72rem/1.16 var(--serif); }
.entry-action { color: var(--green); text-decoration: underline; text-underline-offset: .22em; font-weight: 700; }
@media (max-width: 48rem) {
  .shell { width: calc(100% - 2rem); }
  .note-header { flex-wrap: wrap; align-items: flex-start; gap: .95rem; padding-top: 1.25rem; padding-bottom: 1.15rem; }
  .description-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .note-end { row-gap: 1.48rem; }
}
@media (max-width: 34rem) {
  .header-inner { min-height: 3.8rem; }
  .brand { gap: .52rem; font-size: 1.08rem; }
  .brand-note { width: 1.52rem; height: .94rem; }
  .languages button { min-width: 2.52rem; min-height: 2.75rem; }
  .crumb { margin-top: .93rem; }
  .gallery { grid-template-columns: 1fr; gap: .82rem; }
  .note-header { padding-top: 1.14rem; }
  .note-subtitle { margin-top: .56rem; }
  .gallery + .description-grid { margin-top: 1.15rem; padding-top: 1.15rem; }
  .note-end { margin-top: 1.4rem; padding-top: 1.05rem; }
  .dialog-header { padding-inline: .71rem; }
  .viewer-controls { gap: .22rem; }
  .viewer-controls .icon-button { min-width: 2.42rem; }
  #zoom-value { min-width: 2.55rem; }
  .currency-grid select { font-size: .95rem; }
  #converted { font-size: 1.45rem; }
}

.catalogue-entries {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  align-items: stretch; gap: 1rem;
}
.catalogue-controls {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end;
  gap: .7rem 1.15rem; max-width: 100%; margin-bottom: 1.25rem;
}
.catalogue-filter { width: min(100%, 17rem); }
.catalogue-filter label { display: block; margin-bottom: .32rem; font-size: .875rem; font-weight: 650; }
#catalogue-count { color: var(--muted); min-height: 1.5rem; }
.reference-sheet {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: .32rem .75rem;
  border: 1px solid var(--line); border-radius: .35rem; background: var(--soft);
  color: var(--green); font-weight: 650;
}
.reference-sheet:hover { background: #e2ecdf; }
.rate-attribution p { margin: 0; }
#rate-status { font-weight: 650; }
.historical-panel p { margin: 0; max-width: 58ch; }
