:root {
  --navy: #13263c;
  --deep: #101e31;
  --ink: #192b40;
  --subtle: #526074;
  --line: #dddfe3;
  --paper: #f8f7f4;
  --red: #962f40;
  --red-dark: #782132;
  --soft-red: #f7edef;
  --white: #fff;
  --heading: "Poppins", Arial, sans-serif;
  --sans: "Poppins", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 15px/1.55 var(--sans); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img, svg { display: block; }
svg.icon { flex: none; width: 20px; height: 20px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #c96970;
  outline-offset: 4px;
}
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2 { font: 600 2.5rem/1.1 var(--heading); letter-spacing: -.035em; }
h3 { font-size: 1.03rem; line-height: 1.35; }
button svg, a svg { pointer-events: none; }
[hidden] { display: none !important; }
main { min-height: 45vh; }
main:focus { outline: 0; }
.wrap { width: min(100% - 64px, 1170px); margin-inline: auto; }
.muted { color: var(--subtle); }
.eyebrow { font-size: .72rem; line-height: 1.3; font-weight: 700; letter-spacing: .115em; text-transform: uppercase; }
.small { font-size: .83rem; }
.skip-link { position: fixed; z-index: 20; left: 12px; top: 12px; transform: translateY(-180%); background: var(--white); padding: 12px 18px; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.utility { color: #eaedf3; background: var(--deep); }
.utility-inner { display: flex; gap: 16px; align-items: center; justify-content: space-between; min-height: 36px; font-size: .69rem; }
.utility-title { display: flex; gap: 8px; align-items: center; letter-spacing: .045em; }
.utility-title .icon { width: 14px; height: 14px; color: #e3bac0; }
.utility-status { color: #f2d5d9; padding-left: 12px; border-left: 1px solid #5a4b58; white-space: nowrap; }
.site-header { background: var(--white); border-bottom: 1px solid #e9e7e4; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 79px; }
.brand { display: inline-flex; gap: 12px; align-items: center; flex: 0 0 auto; }
.official-logo { display: block; width: 133px; height: auto; flex: none; }
.brand-divider { width: 1px; align-self: stretch; margin-block: 5px; background: #d8e0e8; }
.header-brand .brand-name { max-width: 142px; font-size: .82rem; }
.brand-mark { background: var(--red); border-radius: 10px; width: 41px; height: 41px; display: grid; place-items: center; color: #fff; }
.brand-mark .icon { width: 24px; height: 24px; }
.brand-name { display: block; font-weight: 700; font-size: 1rem; letter-spacing: -.025em; line-height: 1.2; }
.brand-parent { display: block; margin-top: 3px; color: var(--subtle); font-size: .66rem; font-weight: 700; letter-spacing: .15em; }
.header-end, .desktop-nav { display: flex; align-items: center; }
.header-end { gap: 15px; }
.desktop-nav { gap: 2px; }
.desktop-nav > a, .desktop-nav summary { display: flex; align-items: center; gap: 4px; font-weight: 650; font-size: .82rem; padding: 10px 9px; white-space: nowrap; }
.desktop-nav > a:hover, .desktop-nav summary:hover, .desktop-nav [aria-current="page"] { color: var(--red); }
.desktop-nav details, .mobile-nav { position: relative; }
.desktop-nav summary, .mobile-nav summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
.desktop-nav summary .icon { width: 13px; height: 13px; }
.dropdown { position: absolute; z-index: 5; display: grid; min-width: 188px; top: calc(100% + 10px); left: 0; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); box-shadow: 0 12px 32px #182b401a; }
.dropdown a { padding: 9px 12px; border-radius: 5px; font-size: .87rem; }
.dropdown a:hover { color: var(--red); background: var(--soft-red); }
.plain-icon { display: grid; place-items: center; width: 32px; height: 35px; border: 0; background: transparent; }
.plain-icon:hover { color: var(--red); }
.languages { display: flex; align-items: center; gap: 1px; padding: 3px; border-radius: 7px; background: #f2f1ef; }
.languages button { border: 0; padding: 4px 7px; background: transparent; border-radius: 5px; color: var(--subtle); font-weight: 700; font-size: .69rem; }
.languages button[aria-pressed="true"] { color: var(--red-dark); background: #fff; box-shadow: 0 1px 3px #13263c19; }
.mobile-nav { display: none; }
.mobile-subitem a { display: block; padding-left: 24px; color: var(--subtle); }

.hero { position: relative; isolation: isolate; overflow: hidden; color: white; background: #17283d; }
.hero::before { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(90deg, #13243afc 0%, #13243af0 28%, #13243a9c 55%, #13243a34 100%), url("arsiv-kutuphanesi.webp") right 53%/min(78vw, 1340px) auto no-repeat; }
.hero-inner { padding-block: 60px 56px; }
.hero h1 { max-width: 780px; margin: 15px 0 12px; font-size: clamp(3.5rem, 6.2vw, 5.25rem); letter-spacing: -.055em; line-height: 1.01; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; color: #f2d6d5; }
.hero .eyebrow::before { content: ""; width: 22px; height: 2px; background: #d27782; }
.hero-intro { margin: 20px 0 26px; color: #e0e7ee; max-width: 510px; font-size: 1rem; }
.hero-form { width: min(100%, 640px); display: flex; padding: 6px; background: white; border-radius: 9px; border: 1px solid #ffffff; color: var(--ink); box-shadow: 0 12px 28px #0b102738; }
.hero-input { flex: 1; display: flex; gap: 10px; align-items: center; padding-inline: 12px 8px; min-width: 0; }
.hero-input .icon { color: #506176; }
.hero-input input { width: 100%; min-width: 0; padding: 8px 0; color: var(--ink); border: 0; background: transparent; }
.hero-input input:focus-visible { outline-offset: 1px; }
.hero-actions { width: min(100%, 640px); margin-top: 13px; display: flex; align-items: center; flex-wrap: wrap; column-gap: 17px; row-gap: 8px; color: #e3e8ef; font-size: .8rem; }
.hero-actions a { display: inline-flex; align-items: center; gap: 5px; }
.hero-actions a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hero-actions .icon { width: 15px; height: 15px; }
.hero-actions a:first-child { font-weight: 700; }
.hero-actions .separator { width: 1px; height: 12px; background: #ffffff4d; }

.metrics { background: var(--white); border-bottom: 1px solid #e6e4df; }
.metrics-inner { display: grid; grid-template-columns: repeat(3, 1fr) auto; align-items: stretch; }
.metric { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 17px 12px 17px 0; }
.metric + .metric { border-left: 1px solid #eeeae5; padding-left: 24px; }
.metric-icon { color: var(--red); background: var(--soft-red); width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.metric strong { display: block; font: 700 1.65rem/1 var(--heading); }
.metric span:last-child { display: block; margin-top: 4px; color: var(--subtle); font-size: .77rem; line-height: 1.25; }
.metric-link { display: flex; align-items: center; align-self: center; gap: 7px; color: var(--red-dark); font-weight: 700; font-size: .8rem; padding-left: 12px; }
.metric-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.metric-link .icon { width: 15px; height: 15px; }

.home-section { padding-block: 39px 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 18px; }
.section-heading .eyebrow { color: var(--red); margin-bottom: 7px; }
.section-heading h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.quick-grid, .tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.quick-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 17px 15px; min-height: 92px; }
.quick-card, .tile, .panel, .record, .faq-group details { border: 1px solid #e1e0dd; border-radius: 10px; background: var(--white); }
.quick-card:hover, .tile:hover { border-color: #ba8b94; }
.quick-card p { color: var(--subtle); font-size: .77rem; margin-top: 4px; }
.quick-card > .icon { width: 16px; height: 16px; color: var(--red); }
.latest { padding-block: 21px 55px; }
.latest .records { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.latest .record { min-height: 165px; }
.latest h3 { font-size: 1.1rem; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 41px; padding: 8px 15px; border: 1px solid transparent; border-radius: 7px; font-weight: 700; line-height: 1.25; font-size: .87rem; text-align: center; }
.button.primary { background: var(--red); color: white; }
.button.primary:hover { background: var(--red-dark); }
.button.secondary { background: white; color: var(--ink); border-color: #d7d9dd; }
.button.secondary:hover { color: var(--red-dark); border-color: #b37b86; }
.button.ghost { background: transparent; color: var(--red-dark); }
.button.ghost:hover { background: var(--soft-red); }
.button .icon { width: 17px; height: 17px; }
.hero-form .button { padding: 9px 22px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--red-dark); font-size: .85rem; font-weight: 700; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link .icon { width: 15px; height: 15px; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

.page-head { background: #f1efeb; border-bottom: 1px solid #e4e1db; padding-block: 25px 30px; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 17px; color: var(--subtle); font-size: .77rem; }
.breadcrumbs .icon { width: 12px; height: 12px; }
.breadcrumbs a:hover { color: var(--red-dark); text-decoration: underline; }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 4rem); }
.page-head p { margin-top: 9px; color: var(--subtle); max-width: 760px; }
.page-body { padding-block: 30px 60px; }
.page-body.narrow { max-width: 820px; }
.panel { padding: clamp(19px, 3vw, 30px); }
.panel + .panel { margin-top: 14px; }
.panel h2 { margin-bottom: 10px; font-size: 1.85rem; }
.panel p + p, .panel p + .actions, .panel p + .text-link { margin-top: 12px; }
.notice { border: 1px solid #e6d4d8; border-left: 3px solid var(--red); border-radius: 6px; background: #fff9fa; padding: 11px 14px; color: #65313d; font-size: .86rem; }
.notice + .panel, .notice + .institute-grid { margin-top: 17px; }
.tile { display: flex; flex-direction: column; gap: 9px; padding: 20px; }
.tile h2 { font: 700 1.08rem/1.35 var(--sans); letter-spacing: 0; }
.tile .metric-icon { margin-bottom: 3px; }
.tile p { color: var(--subtle); font-size: .86rem; }
.tile .text-link { margin-top: auto; align-self: start; }
.tile-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 7px; }
.tile.collection { min-height: 140px; }
.directory .tile { min-height: 213px; }
.directory .initials { width: max-content; min-width: 42px; padding-inline: 7px; font-size: .8rem; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid.search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 5px; align-content: start; min-width: 0; }
.field label, label.field > span { font-size: .79rem; font-weight: 700; }
.field :is(input, select, textarea), .results-head select { width: 100%; min-width: 0; border: 1px solid #cfd3d9; border-radius: 6px; background: #fff; color: var(--ink); min-height: 41px; padding: 8px 10px; }
.field textarea { min-height: 100px; resize: vertical; }
.field.full, .field-search { grid-column: 1 / -1; }
.field-search input { min-height: 46px; }
.search-panel .actions { margin-top: 16px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px 11px; }
.results-head select { width: auto; max-width: 50%; }
.results-head h2 { font-size: 1.6rem; }
.records { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.record { padding: 17px 18px; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.record:hover { border-color: #bc9fa6; }
.record-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .76rem; color: var(--subtle); }
.badge { display: inline-flex; padding: 2px 7px; border-radius: 4px; background: #f2efea; color: #5f5061; font-size: .72rem; font-weight: 700; }
.badge.access { color: #355e4f; background: #edf5ef; }
.record-title { font: 600 1rem/1.4 var(--heading); overflow-wrap: anywhere; }
.record-title a:hover { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }
.record-meta { color: var(--subtle); font-size: .82rem; }
.record .text-link { margin-top: auto; align-self: flex-start; padding-top: 4px; }
.record-summary { margin-top: 5px; font-size: .91rem; }
.record-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px 26px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #e7e3de; }
.record-details dt { color: var(--subtle); font-size: .8rem; }
.record-details dd { font-weight: 650; overflow-wrap: anywhere; }
.panel .detail-heading { margin-top: 22px; }
.detail-actions { margin-top: 18px; }
.dataset-label { margin-bottom: 14px; }
.pagination { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 11px; }
.detail-status { margin-top: 12px; min-height: 1em; }
.empty { text-align: center; padding: 30px 15px; color: var(--subtle); }
.faq-group { display: grid; gap: 9px; }
.faq-group details { padding: 14px 17px; }
.faq-group summary { cursor: pointer; font-weight: 700; }
.faq-group details p { margin-top: 8px; color: var(--subtle); font-size: .93rem; }
.institute-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 16px; align-items: start; }
.institute-grid .panel { margin-top: 0; }
.institute-grid .actions { margin-top: 15px; }
.table-wrap { overflow: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
.subnav { margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 7px; }

.site-footer { background: var(--deep); color: #f9fafb; padding-block: 28px 15px; }
.footer-main { display: grid; grid-template-columns: 1.3fr 1fr .75fr; gap: 20px; align-items: start; }
.site-footer .brand-parent { color: #b6c1d1; }
.site-footer .footer-about p { color: #bec9d8; max-width: 335px; margin-top: 10px; font-size: .8rem; }
.footer-group { display: grid; gap: 4px; font-size: .82rem; align-content: start; }
.footer-group a { width: fit-content; color: #c4cedc; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-group strong { font-size: .84rem; margin-bottom: 4px; }
.partner { color: #c4cedc; font-size: .78rem; }
.partner strong { display: block; margin-bottom: 2px; color: #fff; font-size: 1rem; letter-spacing: .1em; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 19px; padding-top: 11px; border-top: 1px solid #ffffff27; color: #aebacd; gap: 10px; font-size: .73rem; }

@media (max-width: 1040px) {
  .wrap { width: min(100% - 48px, 1170px); }
  .header-inner, .header-end { gap: 10px; }
  .desktop-nav > a, .desktop-nav summary { padding: 9px 6px; font-size: .77rem; }
  .brand { gap: 8px; }
  .brand-name { font-size: .91rem; }
}
@media (max-width: 960px) {
  .desktop-nav { display: none; }
  .mobile-nav { display: block; order: 3; }
  .mobile-nav .dropdown { left: auto; right: 0; max-height: 72vh; overflow: auto; }
  .header-inner { min-height: 64px; }
  .hero::before { background-size: auto, cover; }
  .official-logo { width: 113px; }
  .metric + .metric { padding-left: 14px; }
  .quick-grid, .tile-grid, .latest .records { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .institute-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .utility-title { font-size: .59rem; }
  .utility-status { font-size: .62rem; padding-left: 6px; }
  .utility-title .icon { display: none; }
  .header-inner { gap: 5px; }
  .header-end { gap: 5px; }
  .header-end > .plain-icon { display: none; }
  .official-logo { width: 82px; }
  .header-brand .brand-name { max-width: 89px; font-size: .70rem; line-height: 1.25; }
  .brand-mark { width: 34px; height: 34px; border-radius: 8px; }
  .brand-mark .icon { width: 20px; height: 20px; }
  .brand-name { font-size: .81rem; }
  .brand-parent { font-size: .55rem; }
  .hero-inner { padding-block: 39px 36px; }
  .hero h1 { font-size: clamp(2.45rem, 10.2vw, 3.6rem); }
  .hero-intro { margin-block: 17px 20px; font-size: .89rem; }
  .hero-form .button { padding-inline: 12px; }
  .hero-input { padding-inline: 6px; gap: 6px; }
  .hero-input input { font-size: .85rem; }
  .hero-input .icon { width: 16px; height: 16px; }
  .hero-actions { column-gap: 9px; font-size: .72rem; }
  .metrics-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric { flex-direction: column; align-items: flex-start; gap: 6px; padding-block: 13px; }
  .metric-icon { width: 31px; height: 31px; }
  .metric-icon .icon { width: 17px; height: 17px; }
  .metric-link { display: none; }
  .metric span:last-child { font-size: .68rem; }
  .section-heading { align-items: start; }
  .quick-grid, .tile-grid, .latest .records, .form-grid.search-grid { grid-template-columns: 1fr; }
  .latest .record { min-height: auto; }
  .record-details { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .page-body { padding-block: 22px 38px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 18px 10px; }
  .footer-about { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .quick-card, .tile, .record { transition: background-color .16s ease, color .16s ease, border-color .16s ease; }
}
