:root {
  color-scheme: light;
  --ink: #18323a;
  --ink-soft: #294a53;
  --paper: #f8fbfc;
  --white: #ffffff;
  --aqua: #4aa9bf;
  --aqua-bright: #65c6d9;
  --line: #dfe3e2;
  --muted: #697273;
  --shadow: 0 18px 50px rgba(23,25,26,.10);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", Arial, sans-serif; font-size: 16px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { height: 88px; padding: 0 clamp(24px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; background: white; color: var(--ink); border-bottom: 1px solid #e8eff0; }
.brand { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 1.55rem; font-weight: 700; letter-spacing: -.045em; }
.brand-word { color: var(--ink); }
.brand-you { color: var(--aqua); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--aqua-bright); color: var(--aqua-bright); border-radius: 13px 13px 13px 5px; font-family: "Fraunces", Georgia, serif; font-size: 1.35rem; transform: rotate(-3deg); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.add-button { border: 0; cursor: pointer; color: white; }
.add-button { background: var(--aqua); border-radius: 999px; padding: 12px 20px; font-weight: 700; }
.add-button span { margin-right: 5px; font-size: 1.2rem; }
.add-button:hover { filter: brightness(1.06); }

.hero { min-height: 440px; position: relative; display: grid; align-items: center; overflow: hidden; background: linear-gradient(135deg, #ffffff 0%, #f3fbfd 72%, #e9f7fa 100%); color: var(--ink); padding: 54px clamp(24px, 6vw, 96px) 64px; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 10px; background: var(--aqua); }
.hero-inner { position: relative; z-index: 2; width: min(1520px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); grid-template-rows: auto auto 1fr; align-items: center; column-gap: clamp(48px, 7vw, 130px); }
.hero-inner > .eyebrow { grid-column: 1; grid-row: 1; }
.eyebrow { margin: 0 0 18px; color: #25849a; text-transform: uppercase; letter-spacing: .16em; font-size: .79rem; font-weight: 700; }
.eyebrow.dark { color: #25849a; }
h1, h2 { margin: 0; }
h1 { grid-column: 1; grid-row: 2 / 4; max-width: 850px; font-family: "Fraunces", Georgia, serif; font-size: clamp(3.25rem, 5.7vw, 6.7rem); font-weight: 600; line-height: .91; letter-spacing: -.055em; }
h1 em { color: var(--aqua); font-style: normal; }
.search { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: 28px minmax(130px, 1fr) auto auto; align-items: center; gap: 12px; width: 100%; padding: 9px 9px 9px 20px; background: white; border: 1px solid #dce9eb; border-radius: 18px; box-shadow: 0 18px 45px rgba(38,104,119,.13); }
.search svg { width: 24px; fill: none; stroke: #677173; stroke-width: 2; stroke-linecap: round; }
.search input { min-width: 0; height: 52px; padding: 0 4px; border: 0; outline: 0; color: var(--ink); font-size: 1.05rem; }
.search select { height: 42px; border: 0; border-left: 1px solid var(--line); padding: 0 30px 0 18px; color: #596162; background: white; cursor: pointer; }
.search button { height: 52px; border: 0; border-radius: 13px; padding: 0 24px; color: white; background: var(--aqua); font-weight: 700; cursor: pointer; }
.search button:hover { background: #398fa3; }
.quick-ai { grid-column: 2; grid-row: 3; align-self: start; margin-top: 20px; display: flex; align-items: center; gap: 9px; color: #71878c; font-size: .88rem; flex-wrap: wrap; }
.quick-ai a { padding: 7px 12px; border: 1px solid #d6e5e8; border-radius: 999px; color: var(--ink); background: rgba(255,255,255,.72); text-decoration: none; }
.quick-ai a:hover { border-color: var(--aqua); color: #237f94; background: white; }
.quick-ai a span { color: var(--aqua); }
.hero-orbit { position: absolute; width: 560px; height: 560px; right: -165px; top: -62px; opacity: .58; }
.orbit { position: absolute; inset: 0; border: 1px solid #cce7ed; border-radius: 50%; }
.orbit-two { inset: 86px; border-color: #d8edf1; }
.orbit-dot { position: absolute; width: 17px; height: 17px; border-radius: 50%; background: var(--aqua-bright); box-shadow: 0 0 0 9px rgba(101,198,217,.09); }
.dot-one { left: 55px; top: 105px; }
.dot-two { right: 85px; bottom: 100px; width: 10px; height: 10px; }

.directory { max-width: 1440px; margin: 0 auto; padding: 86px clamp(24px, 5vw, 72px) 110px; }
.section-heading { display: flex; justify-content: space-between; gap: 40px; align-items: end; }
.section-heading h2, dialog h2 { font-family: "Fraunces", Georgia, serif; font-size: clamp(2.35rem, 4vw, 4.1rem); line-height: 1; letter-spacing: -.04em; }
.section-heading > p { max-width: 450px; margin: 0 0 4px; color: var(--muted); line-height: 1.65; }
.filters { position: sticky; top: 12px; z-index: 6; display: flex; gap: 9px; margin: 40px 0 28px; overflow-x: auto; padding: 10px; border: 1px solid rgba(218,228,230,.9); border-radius: 999px; background: rgba(248,251,252,.9); box-shadow: 0 10px 30px rgba(38,104,119,.08); backdrop-filter: blur(12px); scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 10px 17px; background: transparent; color: #596162; cursor: pointer; font-size: .9rem; font-weight: 600; }
.filter:hover, .filter.active { background: var(--aqua); border-color: var(--aqua); color: white; }
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.tile { position: relative; min-height: 175px; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; border: 1px solid #e2e5e4; border-radius: var(--radius); background: var(--white); text-decoration: none; box-shadow: 0 2px 0 rgba(23,25,26,.02); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; overflow: hidden; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.tile::after { content: ""; position: absolute; right: -30px; bottom: -48px; width: 110px; height: 110px; border: 18px solid var(--tile-soft); border-radius: 50%; opacity: .7; }
.tile-top { display: flex; align-items: start; justify-content: space-between; position: relative; z-index: 1; }
.tile-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--tile-color); color: white; font-size: 1.06rem; font-weight: 800; letter-spacing: -.04em; }
.tile-arrow { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #677173; font-size: 1.05rem; transition: .18s ease; }
.tile:hover .tile-arrow { background: var(--aqua); border-color: var(--aqua); color: white; transform: translate(2px,-2px); }
.tile-copy { position: relative; z-index: 1; }
.tile h3 { margin: 0 0 4px; font-size: 1.05rem; }
.tile p { margin: 0; color: var(--muted); font-size: .81rem; }
.custom-badge { position: absolute; top: 13px; right: 13px; z-index: 3; border: 0; background: transparent; color: #8a9293; font-size: 1.2rem; cursor: pointer; border-radius: 50%; width: 32px; height: 32px; }
.custom-badge:hover { background: #f0f2f1; color: #b52f2f; }
.tile.custom .tile-arrow { margin-right: 32px; }
.empty-state { padding: 50px; text-align: center; color: var(--muted); }

footer { padding: 32px clamp(24px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: white; border-top: 1px solid #e3ecee; color: #71878c; font-size: .86rem; }
.footer-brand { color: var(--ink); font-size: 1.1rem; }
.footer-brand .brand-mark { width: 31px; height: 31px; border-radius: 10px 10px 10px 4px; font-size: 1rem; }
.footer-credit a { color: inherit; font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer-credit a:hover { color: var(--ink); }
.privacy-settings { border: 0; padding: 4px 0; background: transparent; color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.privacy-settings:hover { color: var(--ink); }

.cookie-banner { position: fixed; z-index: 50; right: 22px; bottom: 22px; left: 22px; max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 22px 24px; border: 1px solid #d7e5e7; border-radius: 20px; background: rgba(255,255,255,.98); box-shadow: 0 24px 70px rgba(24,50,58,.22); }
.cookie-banner[hidden] { display: none; }
.cookie-copy { max-width: 710px; }
.cookie-copy h2 { margin: 0 0 7px; font-family: "DM Sans", Arial, sans-serif; font-size: 1.05rem; letter-spacing: -.01em; }
.cookie-copy p { margin: 0; color: var(--muted); font-size: .89rem; line-height: 1.55; }
.cookie-copy a { color: #247f94; font-weight: 700; }
.cookie-actions { flex: 0 0 auto; display: flex; gap: 10px; }
.cookie-button { min-height: 46px; border-radius: 999px; padding: 0 18px; font-weight: 700; cursor: pointer; }
.cookie-button.primary { border: 1px solid var(--aqua); background: var(--aqua); color: white; }
.cookie-button.secondary { border: 1px solid #bfd3d7; background: white; color: var(--ink); }
.cookie-button:hover { filter: brightness(.97); }

.privacy-back { color: #247f94; font-weight: 700; text-decoration: none; }
.privacy-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.privacy-page { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 100px; }
.privacy-page > h1 { display: block; max-width: 760px; font-size: clamp(2.8rem, 6vw, 5.4rem); line-height: .98; }
.privacy-intro { margin: 28px 0 50px; color: var(--muted); font-size: 1.08rem; line-height: 1.75; }
.privacy-page section { padding: 30px 0; border-top: 1px solid #dfe8e9; }
.privacy-page section h2 { margin: 0 0 13px; font-family: "DM Sans", Arial, sans-serif; font-size: 1.25rem; letter-spacing: -.02em; }
.privacy-page section p { margin: 0 0 12px; color: #4f6267; line-height: 1.75; }
.privacy-page section p:last-child { margin-bottom: 0; }
.privacy-page section a { color: #247f94; font-weight: 700; }
.privacy-page code { padding: 2px 6px; border-radius: 6px; background: #eaf4f6; }
.privacy-updated { margin-top: 28px; color: var(--muted); font-size: .86rem; }

dialog { width: min(520px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 26px; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(10,12,13,.72); backdrop-filter: blur(4px); }
dialog form { padding: 30px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog-head h2 { font-size: 2.25rem; }
.dialog-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #eef1f0; color: #566061; font-size: 1.55rem; cursor: pointer; }
.dialog-intro { color: var(--muted); margin: 18px 0 24px; }
dialog label { display: block; margin: 15px 0 7px; font-size: .86rem; font-weight: 700; }
dialog input, dialog select { width: 100%; min-height: 50px; border: 1px solid #d9dedd; border-radius: 12px; padding: 0 14px; outline: none; background: white; color: var(--ink); }
dialog input:focus, dialog select:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(74,169,191,.15); }
.save-button { width: 100%; min-height: 52px; margin-top: 22px; border: 0; border-radius: 13px; background: var(--aqua); color: white; font-weight: 700; cursor: pointer; }
.form-error { min-height: 18px; margin: 8px 0 -8px; color: #b52f2f; font-size: .84rem; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 28px; transform: translate(-50%, 30px); padding: 12px 18px; border-radius: 999px; background: var(--aqua); color: white; font-weight: 600; opacity: 0; pointer-events: none; transition: .22s ease; box-shadow: 0 10px 30px rgba(74,169,191,.28); }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 1020px) {
  .tile-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hero-orbit { right: -320px; }
  .hero { min-height: 550px; padding: 45px clamp(24px, 8vw, 120px) 78px; }
  .hero-inner { display: block; width: min(900px, 100%); margin: 0; }
  h1 { max-width: 850px; }
  .search { margin-top: 44px; width: min(820px, 100%); }
}
@media (max-width: 760px) {
  .topbar { height: 74px; }
  .add-button { width: 44px; height: 44px; padding: 0; font-size: 0; }
  .add-button span { margin: 0; font-size: 1.5rem; }
  .hero { min-height: 570px; padding: 38px 20px 72px; }
  h1 { font-size: clamp(2.8rem, 12vw, 4.2rem); }
  .search { grid-template-columns: 25px 1fr auto; padding: 8px 8px 8px 16px; }
  .search select { grid-column: 2 / 4; grid-row: 2; width: 100%; border: 0; border-top: 1px solid var(--line); padding: 9px 0 0; height: 40px; }
  .search button { grid-column: 3; grid-row: 1; padding: 0 15px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 18px; }
  .filters { top: 8px; border-radius: 18px; }
  .tile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  footer { flex-direction: column; text-align: center; }
  .cookie-banner { align-items: stretch; flex-direction: column; gap: 16px; padding: 20px; }
  .cookie-actions { width: 100%; }
  .cookie-button { flex: 1; }
}
@media (max-width: 470px) {
  .brand { font-size: 1.3rem; }
  .brand-mark { width: 35px; height: 35px; }
  .tile-grid { grid-template-columns: 1fr; }
  .tile { min-height: 150px; }
  .quick-ai > span { width: 100%; }
  .directory { padding-top: 64px; }
  .cookie-banner { right: 12px; bottom: 12px; left: 12px; border-radius: 17px; }
  .cookie-actions { flex-direction: column-reverse; }
  .cookie-button { width: 100%; }
  .privacy-back { max-width: 120px; text-align: right; font-size: .82rem; }
  .privacy-page { padding-top: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
