/* ACE Nature beta site: shared styles for guide and app pages */

:root {
  --copper: #a16b30; --copper-dark: #7d5222; --olive: #928b5b; --gold: #e2b47c;
  --forest: #1f2b22; --cream: #f7f4ec; --paper: #fffdf8;
  --ink: #26302a; --muted: #5f6a60; --line: #e3ddcd; --tint: #efe5d4;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; font-size: 17px; line-height: 1.7; color: var(--ink); background: var(--cream); }
a { color: var(--copper); }
a:hover { color: var(--copper-dark); }
h1, h2, h3, h4 { font-family: Fraunces, Georgia, serif; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.nav { background: var(--forest); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 48px; height: 48px; padding: 5px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 2px var(--gold), 0 4px 14px rgba(0,0,0,.35); }
.brand span { font-family: Fraunces, serif; font-size: 22px; font-weight: 600; color: var(--gold); }
.brand span i { font-style: normal; font-weight: 400; color: #d9d3b0; }
.nav .links a { color: #e9ecdf; text-decoration: none; font-size: 15px; font-weight: 500; margin-left: 24px; opacity: .85; }
.nav .links a:hover, .nav .links a.here { opacity: 1; color: #fff; }

/* Title band */
.title { background: linear-gradient(180deg, rgba(20,28,22,.82), rgba(20,28,22,.93)), var(--title-img, none) center/cover; color: #fff; padding: 56px 0 48px; }
.crumbs { font-size: 14px; color: #b9c0ad; margin-bottom: 16px; }
.crumbs a { color: #d9d3b0; text-decoration: none; }
.crumbs a:hover { color: #fff; }
.title h1 { font-size: clamp(30px, 4.6vw, 50px); max-width: 24ch; }
.title .lede { color: #dfe3d6; max-width: 60ch; margin: 16px 0 0; font-size: 18px; }

/* Layout: contents sidebar + article */
.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding-top: 52px; padding-bottom: 96px; }
.layout.single { grid-template-columns: minmax(0, 1fr); }
.layout.single article { margin: 0 auto; }
.toc { position: sticky; top: 24px; align-self: start; }
.toc .lbl { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--copper); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; line-height: 1.4; }
.toc a:hover, .toc a.on { color: var(--ink); border-left-color: var(--copper); }
.toc .help { margin-top: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-size: 14px; color: var(--muted); line-height: 1.55; }
.toc .help strong { color: var(--ink); display: block; margin-bottom: 4px; }

/* Article content (converted from the original pages) */
article { max-width: 760px; min-width: 0; }
article > :first-child { margin-top: 0; }
article h2 { font-size: clamp(25px, 3vw, 31px); margin: 56px 0 18px; padding-top: 4px; scroll-margin-top: 24px; }
article h2::before { content: ""; display: block; width: 44px; height: 3px; background: var(--copper); border-radius: 2px; margin-bottom: 16px; }
article h3 { font-size: 21px; margin: 34px 0 12px; }
article h4 { font-size: 18px; margin: 26px 0 10px; color: var(--copper-dark); }
article p { margin: 0 0 16px; }
article ul, article ol { margin: 0 0 20px; padding-left: 0; }
article ul { list-style: none; }
article ul > li { position: relative; padding-left: 26px; margin-bottom: 8px; }
article ul > li::before { content: ""; position: absolute; left: 6px; top: .68em; width: 7px; height: 7px; border-radius: 50%; background: var(--olive); }
article ol { list-style: none; counter-reset: s; }
article ol > li { counter-increment: s; position: relative; padding: 2px 0 2px 46px; margin-bottom: 14px; min-height: 30px; }
article ol > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--tint); color: var(--copper-dark); font-weight: 600; font-size: 14px; display: grid; place-items: center; line-height: 1; }
article li > ul, article li > ol { margin-top: 10px; }
article b, article strong { font-weight: 600; }

/* Media */
article img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 8px 0 16px; }
article li img { margin-top: 10px; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 8px 0 24px; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 18px 40px -24px rgba(20,30,20,.6); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed { margin: 8px 0 24px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); }
.embed iframe { display: block; width: 100%; height: 600px; border: 0; }
.caption { font-size: 15px; color: var(--muted); font-style: italic; margin: 18px 0 8px; }

/* Tables */
.table { overflow-x: auto; margin: 8px 0 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.table table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
.table th { background: var(--tint); color: var(--copper-dark); text-align: left; font-weight: 600; }
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

/* Code */
pre { background: var(--forest); color: #e6eadc; border-radius: 12px; padding: 18px 20px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.6; margin: 8px 0 20px; white-space: pre; }
pre .c { color: #a8b39a; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: #ece7da; padding: 1px 6px; border-radius: 5px; }
pre code { background: none; padding: 0; font-size: inherit; }

/* Button and menu names, e.g. ‘Add Location’ or ‘Get Data’ › ‘From Web’ */
.ui { font-weight: 600; font-size: .86em; background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.sep { color: var(--olive); margin: 0 5px; font-weight: 600; }

/* Quotes and callouts */
blockquote { margin: 8px 0 22px; padding: 4px 0 4px 22px; border-left: 3px solid var(--olive); font-family: Fraunces, Georgia, serif; font-size: 20px; line-height: 1.5; color: var(--moss, #3d4a35); }
.callout { display: flex; gap: 14px; border-radius: 12px; padding: 16px 20px; margin: 16px 0 22px; font-size: 16px; line-height: 1.6; }
.callout::before { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; font-style: normal; }
.callout > div > :last-child { margin-bottom: 0; }
.callout.note { background: #eaeee2; border-left: 4px solid #6f7d55; }
.callout.note::before { content: "i"; background: #6f7d55; font-family: Georgia, serif; }
.callout.warn { background: #fbeee0; border-left: 4px solid var(--copper); }
.callout.warn::before { content: "!"; background: var(--copper); }
.byline { color: var(--muted); }
.download { display: inline-flex; align-items: center; gap: 8px; background: var(--copper); color: #fff !important; text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 18px; border-radius: 999px; margin: 4px 0 16px; }
.download:hover { background: var(--copper-dark); }
.stub { color: var(--muted); font-style: italic; }

/* Contact strip at the end of each guide */
.ask { margin-top: 64px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ask h3 { font-size: 21px; margin: 0 0 4px; }
.ask p { margin: 0; color: var(--muted); font-size: 15.5px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 15px; background: var(--copper); color: #fff !important; }
.btn:hover { background: var(--copper-dark); }

/* Guides index */
.group { margin-bottom: 56px; }
.group h2 { font-size: 28px; margin-bottom: 6px; }
.group > p { color: var(--muted); margin: 0 0 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--olive); box-shadow: 0 14px 30px -20px rgba(40,50,30,.4); color: var(--ink); }
.card strong { display: block; font-family: Fraunces, Georgia, serif; font-size: 18px; font-weight: 600; line-height: 1.3; }
.card span { display: block; font-size: 14.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

footer { background: var(--forest); color: #aeb5a3; font-size: 14px; padding: 32px 0; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: #d9d3b0; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; }
  .toc { position: static; }
  .toc .help { display: none; }
  .nav .links a:not(:last-child) { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .title { padding: 40px 0 36px; }
  .embed iframe { height: 460px; }
  .ask { padding: 22px; }
  .brand span { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } }
