/* Shared styles for TreasureCompass guides — same design language as the homepage. */
:root {
  --forest: #2D4A2B;
  --forest-dark: #182718;
  --gold: #C9A227;
  --gold-hover: #dbb43a;
  --cream: #f8f5ee;
  --sand: #efe9db;
  --text: #1e241c;
  --muted: #5f5b4e;
  --line: #e3dccb;
  --radius: 16px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream); color: var(--text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.18; letter-spacing: -.01em; }
a { color: inherit; }

main { max-width: 760px; margin: 0 auto; padding: 136px 24px 70px; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
article h1 { font-size: clamp(1.9rem, 4.6vw, 2.7rem); margin-bottom: 14px; }
.byline { color: var(--muted); font-size: .85rem; margin-bottom: 26px; }

/* Guide page: cover hero, then the article with a sticky sidebar. */
.g-hero { position: relative; min-height: 440px; display: flex; align-items: flex-end; color: #fff;
  background: linear-gradient(180deg, rgba(16,26,16,.72) 0%, rgba(16,26,16,.25) 38%, rgba(16,26,16,.88) 100%), var(--cover) center/cover, var(--forest-dark); }
.g-hero-in { width: 100%; max-width: 1240px; margin: 0 auto; padding: 150px 24px 52px; }
.g-hero .crumbs, .g-hero .crumbs a { color: rgba(255,255,255,.75); }
.g-hero h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); max-width: 900px; margin-bottom: 14px; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.g-hero .byline { color: rgba(255,255,255,.78); margin: 0; }
main.g-layout { max-width: 1240px; padding: 56px 24px 70px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
main.g-layout article { max-width: 780px; font-size: 1.05rem; }
main.g-layout article h2 { scroll-margin-top: 110px; }
.g-side { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 18px; }
.g-toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.g-toc b, .g-cta b { display: block; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.g-toc ol { list-style: none; counter-reset: t; max-height: 52vh; overflow: auto; }
.g-toc li { counter-increment: t; margin: 0; }
.g-toc a { display: flex; gap: 10px; padding: 6px 0; font-size: .9rem; line-height: 1.35; color: var(--text); text-decoration: none; }
.g-toc a::before { content: counter(t, decimal-leading-zero); color: var(--gold); font-weight: 700; font-size: .78rem; padding-top: 1px; }
.g-toc a:hover { color: var(--forest); text-decoration: underline; }
.g-cta { position: relative; overflow: hidden; background: var(--forest-dark); color: #e8e4d8; border-radius: var(--radius); padding: 22px; }
.g-cta::before { content: ""; position: absolute; inset: 0; background: url(/images/home/contours.svg?v=4) center/cover; opacity: .08; }
.g-cta > * { position: relative; }
.g-cta b { color: var(--gold); }
.g-cta p { font-size: .92rem; color: #cfc9b8; margin-bottom: 14px; line-height: 1.5; }
.g-cta a { display: inline-block; background: var(--gold); color: #1a2410; font-weight: 700; font-size: .9rem; padding: 10px 18px; border-radius: 10px; text-decoration: none; }
.g-cta a:hover { background: var(--gold-hover); }
@media (max-width: 980px) {
  main.g-layout { grid-template-columns: 1fr; gap: 0; }
  .g-side { display: none; }
  .g-hero { min-height: 360px; }
  .g-hero-in { padding: 120px 20px 36px; }
}
article .lead { font-size: 1.12rem; color: var(--muted); margin-bottom: 28px; }
article h2 { font-size: 1.5rem; margin: 44px 0 14px; }
article h3 { font-size: 1.15rem; margin: 30px 0 10px; }
article p { margin: 0 0 16px; }
article ul, article ol { margin: 0 0 16px 22px; }
article li { margin-bottom: 8px; }
article img { max-width: 100%; border-radius: var(--radius); box-shadow: 0 12px 34px rgba(30,36,28,.16); margin: 10px 0 6px; }
article figure { margin: 26px 0; }
article figcaption { font-size: .82rem; color: var(--muted); margin-top: 10px; }
article strong { color: var(--text); }
article blockquote { border-left: 3px solid var(--gold); padding: 4px 0 4px 18px; color: var(--muted); font-style: italic; margin: 0 0 16px; }

.cta-box { background: var(--forest-dark); color: #e8e4d8; border-radius: var(--radius); padding: 26px 28px; margin: 36px 0; }
.cta-box h3 { color: #fff; margin: 0 0 8px; font-size: 1.25rem; }
.cta-box p { color: #cfc9b8; margin-bottom: 16px; }
.cta-box a.btn { display: inline-block; background: var(--gold); color: #1a2410; font-weight: 700;
  padding: 11px 22px; border-radius: 10px; text-decoration: none; }
.cta-box a.btn:hover { background: var(--gold-hover); }

.tip { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 16px 18px; margin: 0 0 16px; font-size: .95rem; }
.tip b:first-child { display: block; margin-bottom: 4px; }

table { border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: .9rem; background: #fff;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--sand); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }

.more { max-width: 1240px; margin: 0 auto; padding: 0 24px 80px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.more h2 { grid-column: 1 / -1; font-size: 1.5rem; margin: 10px 0 0; }
.more a { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.more a:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(30,36,28,.14); }
.more .m-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.more .m-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; color: var(--muted); font-size: .88rem; }
.more a b { display: block; font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; color: var(--text); }

footer { background: var(--forest-dark); color: #b9b4a3; padding: 34px 0; }
footer .wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
footer img { height: 56px; }
footer nav { margin-left: auto; display: flex; gap: 20px; }
footer a { color: #b9b4a3; text-decoration: none; font-size: .85rem; }
footer a:hover { color: #fff; }

/* Guides index */
.hub-hero { padding: 150px 24px 64px; }
.hub-in { max-width: 1240px; margin: 0 auto; }
.hub-hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 14px; }
.hub-hero .lead { color: rgba(255,255,255,.78); font-size: 1.12rem; max-width: 720px; margin-bottom: 24px; }
.hub { max-width: 1240px; margin: 0 auto; padding: 48px 24px 80px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(30,36,28,.16); }
.card .c-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; transition: transform .5s; }
.card:hover .c-img { transform: scale(1.04); }
.card .c-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1; position: relative; background: #fff; }
.card b { font-family: var(--serif); font-size: 1.22rem; line-height: 1.28; }
.card .c-desc { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.card .c-more { margin-top: auto; padding-top: 8px; color: var(--forest); font-weight: 700; font-size: .88rem; }
.card .lang { display: flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 700; color: #9a7a14; letter-spacing: .06em; text-transform: uppercase; }
.card .lang img { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.1); }
.card[hidden] { display: none; }
.g-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .9rem; }
.g-filter[hidden] { display: none; }
.g-filter span { background: rgba(201,162,39,.18); color: #f0d77a; font-weight: 700; padding: 7px 14px; border-radius: 20px; }
.g-filter button { background: none; border: 0; color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; opacity: .85; }
.g-filter button:hover { opacity: 1; }
