/* Self-hosted Raleway and Roboto (SIL Open Font License: OFL.txt in each fonts folder).
   Both are variable fonts: one file per script subset covers every weight. */
@font-face { font-family: Raleway; font-style: normal; font-weight: 500 800; font-display: swap; src: url("../fonts/raleway/raleway-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Raleway; font-style: normal; font-weight: 500 800; font-display: swap; src: url("../fonts/raleway/raleway-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Roboto; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/roboto/roboto-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Roboto; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/roboto/roboto-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Country flags for browsers without them (Chrome and Edge on Windows). src/flags.js adds
   .flag-polyfill to <html> only there; the unicode-range means the font is downloaded only on
   pages that show a flag. Artwork: Twemoji, CC BY 4.0 (fonts/twemoji-country-flags/LICENSE.md). */
@font-face { font-family: "Twemoji Country Flags"; font-display: swap; src: url("../fonts/twemoji-country-flags/TwemojiCountryFlags.woff2") format("woff2"); unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F; }

:root {
  color-scheme: light;
  --ink: #202a35;
  --muted: #505d6b;
  --blue: #125c91;
  --navy: #123857;
  --line: #dce4eb;
  --orange: #f39425;
  --flags: ;
  --display: var(--flags) Raleway, "Segoe UI", sans-serif;
  --body: var(--flags) Roboto, "Segoe UI", sans-serif;
  --mono: Consolas, "Liberation Mono", monospace;
}
:root.flag-polyfill { --flags: "Twemoji Country Flags", ; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; font: 1rem/1.55 var(--body); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; }
a { color: var(--blue); text-underline-offset: .2em; }
a:hover { color: var(--navy); }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #146ca7; outline-offset: 3px; }
.container { width: min(100% - 3.5rem, 76rem); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { position: absolute; top: 1rem; left: 1rem; z-index: 10; padding: .5rem 1rem; background: white; }

.site-header { background: white; border-bottom: 1px solid #e7edf0; }
.header-inner { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { width: 10rem; height: auto; }
.site-header nav { display: flex; align-items: center; gap: clamp(.85rem, 2.15vw, 1.8rem); }
.site-header nav a { padding: .65rem 0; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--blue); text-decoration: underline; }
.site-header nav .header-search { display: grid; place-items: center; width: 1.8rem; height: 2rem; }
.header-search .search-icon { width: .92rem; margin: 0; }

.hero { background: #f3f7fb; border-bottom: 1px solid #e1e9f0; }
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 2.5rem; padding-block: 3.65rem 3.75rem; }
.hero h1 { font-size: clamp(2.9rem, 6.45vw, 5.75rem); font-weight: 800; line-height: .99; letter-spacing: -.06em; }
.hero h1 em { color: var(--blue); font-style: normal; }
.hero-copy > p { max-width: 28rem; margin: 1.25rem 0 1.6rem; color: var(--muted); font-size: 1.125rem; }
.search-form { display: flex; align-items: center; gap: .75rem; max-width: 37rem; padding: .35rem; background: #fff; border: 1px solid #bccbda; border-radius: .65rem; }
.hero-search { box-shadow: 0 5px 17px #213f6210; }
.search-form:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.search-form input { min-width: 0; flex: 1; padding: .5rem 0; border: none; color: var(--ink); outline: none; }
.search-form input:focus-visible { outline: none; }
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-icon { position: relative; flex: 0 0 .92rem; height: .92rem; margin-inline: .55rem .12rem; border: 2px solid #596d80; border-radius: 50%; }
.search-icon::after { position: absolute; content: ""; width: .38rem; height: 2px; background: #596d80; right: -.33rem; bottom: -.12rem; transform: rotate(45deg); }
.button { display: inline-block; background: var(--navy); border: 1px solid var(--navy); border-radius: .4rem; color: white; text-decoration: none; padding: .65rem 1.15rem; font-weight: 700; white-space: nowrap; }
.button:hover { color: white; background: var(--blue); border-color: var(--blue); }
.quick-search { display: flex; flex-wrap: wrap; align-items: center; gap: .47rem; margin-top: .85rem; font-size: .9rem; color: var(--muted); }
.quick-search a { display: inline-block; padding: .18rem .6rem; border: 1px solid #d7e2ec; border-radius: .25rem; background: #fff; color: var(--navy); text-decoration: none; font-family: var(--mono); }
.quick-search a:hover { border-color: var(--blue); text-decoration: underline; }

.hero-symbols { min-height: 19rem; display: grid; align-items: center; grid-template-columns: .85fr 1.2fr .85fr; gap: .55rem; }
.symbol-tile { display: grid; justify-items: center; align-content: center; gap: .45rem; min-height: 9rem; min-width: 0; padding: .75rem .22rem; border-radius: .95rem; font-weight: 700; }
.symbol-tile > span { font-family: var(--flags) "Segoe UI Symbol", "DejaVu Sans", sans-serif; font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1; }
.symbol-tile > code { font-family: var(--mono); font-size: .82rem; letter-spacing: .02em; }
.tile-arrow { transform: rotate(-10deg) translateY(.9rem); color: #164b72; background: #dcebf7; border: 1px solid #c5dcee; }
.tile-heart { z-index: 1; min-height: 13rem; transform: translateY(-.45rem); color: white; background: var(--navy); box-shadow: 0 16px 25px #143e6440; }
.tile-heart > span { color: #ffb155; font-size: clamp(3.5rem, 8vw, 6.5rem); }
.tile-heart .copy-button { margin-top: .45rem; border-color: #6185a7; color: white; background: #254a6a; }
.tile-heart .copy-button:hover { background: #326185; }
.tile-omega { transform: rotate(9deg) translateY(1.15rem); color: #784305; background: #ffebd2; border: 1px solid #f7d6ac; }

.browse-section { padding-block: 2.8rem 4rem; }
.section-heading { margin-bottom: 1.3rem; }
.section-heading h2, .results-panel h2 { font-size: clamp(1.6rem, 2.75vw, 2.25rem); font-weight: 800; letter-spacing: -.035em; }
.section-heading p { margin-top: .4rem; color: var(--muted); }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.highlight { overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: .75rem; background: #fff; box-shadow: 0 3px 8px #253f5510; }
.highlight-heading { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem .92rem .85rem; min-height: 6rem; }
.highlight-heading h3 { font-size: 1.22rem; font-weight: 800; }
.highlight-heading p { margin-top: .25rem; color: var(--muted); font-size: .9rem; line-height: 1.35; }
.category-icon { flex: 0 0 2.4rem; display: grid; place-items: center; height: 2.4rem; background: #e8f1f9; color: var(--navy); border-radius: .45rem; font: 700 .96rem/1 var(--mono); }
.category-symbols, .category-encoding-tables { color: #713f08; background: #ffeed9; }
.category-emoji { color: #663876; background: #f3eaf7; }
.category-link { display: block; margin-top: auto; padding: .85rem 1rem; border-top: 1px solid var(--line); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.catalog-table { width: 100%; border-collapse: collapse; text-align: left; }
.catalog-table th { padding: .6rem 1rem; background: #f3f6f9; color: #45576a; font-size: .875rem; font-weight: 700; }
.catalog-table td { padding: .64rem 1rem; border-bottom: 1px solid #e5eaf0; }
.catalog-table tbody tr:last-child td { border-bottom: 0; }
.catalog-table tbody tr:hover { background: #fafbfd; }
.catalog-table td:nth-child(2) { width: 29%; }
.compact-table th, .compact-table td { padding-inline: .6rem; }
.compact-table th:first-child, .compact-table td:first-child { padding-left: .9rem; }
.compact-table td { padding-block: .5rem; font-size: .88rem; }
.character-cell { display: flex; gap: .55rem; align-items: center; min-width: 0; }
.glyph { display: inline-grid; place-items: center; flex: 0 0 auto; min-width: 1.85rem; min-height: 1.85rem; font-size: 1.35rem; }
.name-cell { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.name-cell a { color: var(--ink); text-decoration: none; }
.name-cell a:hover { color: var(--blue); text-decoration: underline; }
.row-section { display: block; color: var(--muted); font-size: .77rem; font-weight: 400; }
.code-value { font-family: var(--mono); font-size: .9em; font-weight: 600; color: var(--navy); overflow-wrap: anywhere; }
.copy-cell { width: 1%; text-align: right; }
.copy-button { white-space: nowrap; padding: .29rem .62rem; border: 1px solid #c9d7e4; border-radius: .38rem; color: var(--navy); background: white; font-size: .875rem; font-weight: 700; }
.copy-button:hover { background: #eef5fb; border-color: #91b0cb; }
.copy-status:not(:empty) { position: fixed; bottom: 1.2rem; right: 1.2rem; left: auto; z-index: 3; padding: .6rem 1rem; color: white; background: var(--navy); border-radius: .4rem; box-shadow: 0 3px 10px #213f6240; }

.page-heading { padding-block: 1.4rem 2.25rem; background: #f3f7fb; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; gap: .6rem; margin-bottom: .8rem; color: var(--muted); font-size: .91rem; }
.page-heading h1 { font-weight: 800; letter-spacing: -.045em; font-size: clamp(2.25rem, 5vw, 3.7rem); }
.page-heading p, .page-heading .search-form { margin-top: .85rem; }
.section-layout { padding-block: 2rem 4rem; }
.section-layout.has-sections, .character-layout { display: grid; grid-template-columns: minmax(12rem, 19rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.section-layout.has-sections > *, .character-layout > * { min-width: 0; }
.sidebar { border: 1px solid var(--line); border-radius: .65rem; padding: 1rem; }
.sidebar h2 { margin-bottom: .6rem; font-size: 1.13rem; }
.section-nav { overflow-x: auto; }
.section-nav a { display: block; width: max-content; min-width: 100%; padding: .38rem .45rem; border-radius: .3rem; text-decoration: none; white-space: nowrap; }
.section-nav a:hover, .section-nav a[aria-current] { background: #eaf2f9; color: var(--navy); }
.section-nav-group + .section-nav-group { border-top: 1px solid var(--line); }
.section-nav-group summary { padding: .6rem .45rem; font-weight: 700; cursor: pointer; }
.section-nav-group summary:hover { color: var(--navy); background: #eaf2f9; }
.section-nav-group a { width: auto; min-width: 0; padding-inline-start: 1.35rem; white-space: normal; }
.section-jump { display: none; }
.results-panel { overflow: hidden; border: 1px solid var(--line); border-radius: .65rem; }
.results-panel > h2 { padding: 1rem; font-size: 1.45rem; }
.empty-state { padding: 1rem; color: var(--muted); }
#results-heading { scroll-margin-top: 1rem; }
.pagination-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem 1rem; padding: .7rem 1rem; border-top: 1px solid var(--line); }
.result-range { color: var(--muted); font-size: .875rem; }
.result-range strong { color: var(--ink); }
.pagination, .page-numbers, .page-jump { display: flex; align-items: center; gap: .3rem; }
.pagination a, .pagination span.page-direction, .page-number[aria-current], .page-jump button {
  display: inline-grid; place-items: center; min-width: 2rem; min-height: 2.2rem; padding: .2rem .46rem;
  border: 1px solid #c9d7e4; border-radius: .35rem; color: var(--navy); background: white;
  font-size: .875rem; font-weight: 700; text-decoration: none;
}
.pagination a:hover, .page-jump button:hover { background: #eaf2f9; border-color: #91b0cb; }
.pagination .page-number[aria-current] { background: var(--navy); border-color: var(--navy); color: white; }
.pagination span.is-disabled { color: var(--muted); background: #f4f6f8; border-color: #e3e9ee; }
.page-gap { padding-inline: .17rem; color: var(--muted); }
.page-jump { font-size: .875rem; }
.page-jump input { width: 4.25rem; padding: .32rem; border: 1px solid #c9d7e4; border-radius: .35rem; color: var(--ink); }
.character-display { min-height: 10rem; display: grid; justify-items: center; gap: .8rem; padding: 1.15rem; color: var(--navy); background: #eef5fb; border-radius: .65rem; }
.character-display > span { font-size: 5rem; line-height: 1.2; overflow-wrap: anywhere; max-width: 100%; }
.unicode-value { margin: .8rem 0 0; }
.unicode-value dt { color: var(--muted); font-size: .9rem; }
.unicode-value dd { margin: .12rem 0 0; }
.page-heading .sequence-note { margin-top: .4rem; color: var(--muted); font-size: .9rem; }
.observation-group { padding: 1rem; border-top: 1px solid var(--line); }
.observation-group h3 { font-size: 1.125rem; }
.code-list { display: flex; flex-wrap: wrap; gap: .55rem 1.15rem; margin: .75rem 0 .3rem; }
.code-list dd { margin: 0; }
.code-list dt { font-size: .9rem; }
.site-footer { background: #f5f7fa; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: space-between; padding-block: 1.6rem; font-size: .92rem; }
.footer-inner a { color: var(--ink); font-weight: 700; }

@media (max-width: 62rem) {
  .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header nav { gap: .9rem; font-size: .92rem; }
}
@media (max-width: 47rem) {
  .container { width: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; gap: .2rem; padding-top: .6rem; }
  .site-header nav { flex-wrap: wrap; gap: .05rem 1.05rem; padding-bottom: .35rem; }
  .site-header nav a { padding: .4rem 0; }
  .brand img { width: 8rem; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-block: 2.35rem 1.65rem; }
  .hero-break { display: none; }
  .hero-symbols { width: min(100%, 24rem); margin-inline: auto; min-height: 10rem; }
  .symbol-tile { min-height: 5.4rem; border-radius: .65rem; }
  .tile-heart { min-height: 8rem; }
  .tile-arrow, .tile-omega { transform: none; }
  .section-layout.has-sections, .character-layout { grid-template-columns: minmax(0, 1fr); }
  .section-layout.has-sections .results-panel { order: -1; }
  .section-jump { display: inline-block; margin-top: .5rem; }
  .catalog-table td, .catalog-table th { padding-inline: .58rem; }
  .pagination-bar { padding-inline: .58rem; }
  .pagination { flex-wrap: wrap; }
  .pagination a.page-number, .page-number[aria-current] { min-width: 1.75rem; padding-inline: .32rem; }
}
@media (max-width: 35rem) {
  .highlights { grid-template-columns: minmax(0, 1fr); }
  .highlight-heading { min-height: auto; }
  .browse-section { padding-block: 1.9rem 2.5rem; }
  .search-form { gap: .55rem; }
  .search-form .button { padding-inline: .75rem; }
}

/* Content pages (about, privacy, terms, contact) */
.prose > * { max-width: 46rem; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2rem; font-size: 1.35rem; }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: .35rem; }
.prose address { font-style: normal; }
.prose code { font-family: var(--mono); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; }
.footer-inner p { margin-top: .2rem; }

/* Contact form */
.contact-form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.contact-form label { display: grid; gap: .3rem; font-weight: 600; }
.contact-form input, .contact-form textarea { width: 100%; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: .4rem; color: var(--ink); font: inherit; font-weight: 400; }
.contact-form textarea { resize: vertical; }
.contact-form .button { justify-self: start; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { color: var(--muted); font-size: .9rem; }
.notice { padding: .75rem 1rem; border: 1px solid var(--line); border-radius: .4rem; background: #f5f7fa; }
.notice-success { border-color: #9fd3b0; background: #edf8f1; color: #1d5c34; }
.notice-error { border-color: #efb1aa; background: #fdf0ee; color: #8a2419; }

/* Error pages */
.error-page { max-width: 40rem; text-align: center; }
.error-page > * + * { margin-top: 1rem; }
.error-code { color: var(--orange); font: 800 4.5rem/1 var(--display); }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }

@media (max-width: 47rem) {
  .form-row { grid-template-columns: minmax(0, 1fr); }
}
