:root {
  --ink: #33251d;
  --muted: #756d66;
  --line: #ead9c9;
  --accent: #b35d21;
  --teal: #168b88;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #f8f3ed; }
body { min-width: 320px; min-height: 100vh; margin: 0; padding: 8px; color: var(--ink); background: radial-gradient(circle at 50% -20%, #fff 0, #fbf7f2 52%, #f4eee7 100%); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

.tools-shell { position: relative; width: 100%; min-height: calc(100vh - 16px); padding: 22px 32px 22px; overflow: hidden; border: 1px solid #eadbcd; border-radius: 22px; background: rgba(255, 253, 249, .92); box-shadow: 0 7px 28px rgba(106, 70, 40, .06); }
.site-header { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; min-height: 78px; margin: -22px -32px 22px; padding: 0 31px; border-bottom: 1px solid var(--line); background: #fff; }
.brand { display: inline-flex; align-items: center; width: max-content; gap: 12px; }
.brand-mark { display: inline-flex; width: 45px; height: 45px; color: var(--accent); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 19px; line-height: 1.15; letter-spacing: .08em; }
.brand-copy small { font-size: 12px; line-height: 1.25; letter-spacing: .06em; color: var(--muted); }
.site-nav { display: flex; justify-content: center; align-items: stretch; gap: clamp(12px, 2vw, 24px); height: 78px; }
.site-nav__link { position: relative; display: inline-flex; align-items: center; color: #25211e; font-size: 16px; font-weight: 600; white-space: nowrap; }
.site-nav__link::after { position: absolute; right: 0; bottom: 15px; left: 0; height: 2px; border-radius: 99px; background: var(--accent); content: ""; opacity: 0; transform: scaleX(.45); transition: opacity .2s ease, transform .2s ease; }
.site-nav__link:hover::after, .site-nav__link.is-active::after { opacity: 1; transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 17px; }
.membership-button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border: 1px solid #e4cdb8; border-radius: 12px; color: #8b4f1c; background: #fffdfa; font-size: 14px; font-weight: 600; white-space: nowrap; }
.membership-button svg { width: 20px; height: 20px; }
.icon-button, .avatar-button { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.icon-button { width: 28px; height: 36px; color: #272421; }
.icon-button svg { width: 26px; height: 26px; }
.avatar-button { width: 42px; height: 42px; border: 1px solid #aaa9a7; border-radius: 50%; background: #f0efee; }
.tools-heading { text-align: left; }
.tools-heading h1 { margin: 0; color: #6d3617; font-size: 36px; line-height: 1.25; font-weight: 700; letter-spacing: .04em; }
.tools-heading p { margin: 13px 0 0; color: #696560; font-size: 16px; line-height: 1.5; }

.tool-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 20px; max-width: 1580px; margin: 28px auto 0; }
.directory-card { position: relative; display: grid; grid-template-columns: minmax(205px, 53%) minmax(0, 47%); align-items: stretch; min-width: 0; height: 232px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 249, .86); box-shadow: 0 4px 13px rgba(105, 70, 42, .035); }
.directory-card.is-available { cursor: pointer; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.directory-card.is-available:hover { border-color: #d7ae8a; box-shadow: 0 11px 25px rgba(112, 72, 42, .1); transform: translateY(-3px); }
.directory-card.is-available:focus-visible { outline: 3px solid rgba(179, 93, 33, .2); outline-offset: 3px; }
.directory-card.is-coming { cursor: default; }

.card-preview { display: block; width: 100%; height: 100%; background-image: url("./assets/more-tools/tool-preview-atlas-display-v1.webp"); background-repeat: no-repeat; background-size: 300% 200%; }
.preview-hair { background-position: 0 0; }
.preview-id { background-position: 50% 0; }
.preview-outfit { background-position: 100% 0; }
.preview-background { background-position: 0 100%; }
.preview-retouch { background-position: 50% 100%; }
.preview-makeup { background-position: 100% 100%; }

.card-copy { display: flex; flex-direction: column; min-width: 0; padding: 26px 18px 18px 22px; }
.card-heading { display: flex; align-items: center; gap: 9px; min-width: 0; }
.card-heading strong { font-size: 19px; line-height: 1.25; font-weight: 700; white-space: nowrap; }
.available-badge, .coming-badge { display: inline-flex; align-items: center; flex: 0 0 auto; height: 21px; padding: 0 7px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.available-badge { color: #a7561d; background: #fff0e3; }
.available-badge--teal { color: #147a77; background: #e7f5f3; }
.coming-badge { color: #8c8178; background: #f1eee9; }
.card-copy > small { display: block; min-height: 45px; margin-top: 10px; color: #756e68; font-size: 13px; line-height: 1.65; }
.feature-list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px 6px; margin-top: auto; }
.feature-list > span { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid #ecd9c8; border-radius: 9px; color: #665c55; background: rgba(255, 253, 250, .92); font-size: 12px; white-space: nowrap; }
.feature-list svg { width: 16px; height: 16px; color: #ce6a2b; stroke-width: 1.8; }
.feature-list--teal svg { color: var(--teal); }
.directory-card.is-coming .card-preview { filter: saturate(.94); }

.privacy-note { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 17px; max-width: 1580px; min-height: 95px; margin: 31px auto 0; padding: 15px 24px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255, 254, 251, .78); }
.privacy-icon { display: inline-flex; align-items: center; justify-content: center; width: 57px; height: 57px; border-radius: 50%; color: #4d8c3a; background: #edf5e9; }
.privacy-icon svg { width: 30px; height: 30px; stroke-width: 1.8; }
.privacy-note strong { font-size: 18px; }
.privacy-note p { margin: 8px 0 0; color: #827a73; font-size: 14px; line-height: 1.5; }

@media (max-width: 1350px) {
  .tools-shell { padding-inline: 32px; }
  .tool-directory { gap: 22px 18px; }
  .directory-card { grid-template-columns: minmax(165px, 51%) minmax(0, 49%); height: 244px; }
  .card-copy { padding: 28px 14px 18px 20px; }
  .card-heading strong { font-size: 20px; }
  .card-copy > small { margin-top: 11px; font-size: 13px; }
  .feature-list > span { height: 30px; padding-inline: 7px; font-size: 11px; }
}

@media (max-width: 1050px) {
  .site-header { grid-template-columns: 1fr auto; min-height: 108px; margin-top: -32px; padding-block: 10px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; width: 100%; height: 38px; overflow-x: auto; }
  .site-nav__link::after { bottom: 2px; }
  .tools-shell { padding-top: 32px; }
  .tool-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .site-header { margin: -20px -14px 20px; padding-inline: 14px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-copy strong { font-size: 17px; }
  .brand-copy small { font-size: 11px; }
  .header-actions { gap: 9px; }
  .membership-button { padding: 7px 8px; font-size: 12px; }
  .membership-button svg { width: 17px; height: 17px; }
  .avatar-button { width: 36px; height: 36px; }
  body { padding: 0; }
  .tools-shell { min-height: 100vh; padding: 20px 14px 24px; border: 0; border-radius: 0; }
  .tools-heading h1 { font-size: 30px; }
  .tools-heading p { margin-top: 8px; font-size: 13px; }
  .tool-directory { grid-template-columns: 1fr; gap: 16px; margin-top: 25px; }
  .directory-card { grid-template-columns: minmax(150px, 49%) minmax(0, 51%); height: 210px; border-radius: 14px; }
  .card-copy { padding: 22px 12px 15px 16px; }
  .card-heading { gap: 6px; }
  .card-heading strong { font-size: 18px; }
  .available-badge, .coming-badge { height: 19px; padding-inline: 5px; font-size: 9px; }
  .card-copy > small { min-height: 47px; margin-top: 9px; font-size: 12px; line-height: 1.65; }
  .feature-list { gap: 5px; }
  .feature-list > span { height: 26px; padding-inline: 6px; border-radius: 7px; font-size: 10px; }
  .feature-list svg { width: 13px; height: 13px; }
  .privacy-note { grid-template-columns: 45px minmax(0, 1fr); gap: 12px; margin-top: 20px; padding: 14px; }
  .privacy-icon { width: 44px; height: 44px; }
  .privacy-icon svg { width: 23px; height: 23px; }
  .privacy-note strong { font-size: 14px; }
  .privacy-note p { margin-top: 5px; font-size: 11px; }
}

@media (max-width: 390px) {
  .directory-card { grid-template-columns: 46% 54%; height: 198px; }
  .card-copy { padding-left: 12px; }
  .feature-list > span { padding-inline: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .directory-card.is-available { transition: none; }
}
