/* Misuro Guides: same tokens and type as the home page (index.html). */
@font-face { font-family: "Onest"; src: url("../fonts/Onest-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Onest"; src: url("../fonts/Onest-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Onest"; src: url("../fonts/Onest-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F2F4F6; --band: #EAEDF1; --tile: #FFFFFF; --text: #12171D; --muted: #55616D; --faint: #87919B;
  --line: rgba(14,22,32,.07); --ink: #151A20; --on-ink: #FFFFFF;
  --accent: #FF5C3B;
  --brand: linear-gradient(60deg, #FF822A, #FF5C3B 45%, #EE007D);
  --shadow: 0 30px 80px rgba(27,39,51,.18);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 17px/1.65 "Onest", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header, as on the home page */
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand span { color: var(--faint); font-weight: 500; }
header nav { display: flex; align-items: center; gap: 18px; font-size: 14.5px; }
header nav a { text-decoration: none; color: var(--muted); white-space: nowrap; }
header nav a:hover, header nav a[aria-current] { color: var(--text); }
.lang { display: flex; gap: 3px; background: var(--tile); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.lang a { font-size: 13px; font-weight: 500; color: var(--muted); padding: 4px 10px; border-radius: 7px; text-decoration: none; }
.lang a[aria-current] { background: var(--ink); color: var(--on-ink); }

/* Guide index */
.intro { padding: 40px 0 28px; max-width: 760px; }
.intro h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 14px; }
.intro p { color: var(--muted); font-size: 19px; margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding-bottom: 64px; }
.card { background: var(--tile); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none;
        display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(27,39,51,.06), 0 16px 32px rgba(27,39,51,.10); }
.card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--bg); padding: 18px; }
.card div { padding: 18px 20px 22px; }
.card .date { display: block; font-size: 13px; color: var(--faint); margin-bottom: 4px; }
.card .kind { font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
/* The latest guide, larger, image beside the text */
.card.feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.35fr 1fr; }
.card.feature img { height: 100%; aspect-ratio: auto; min-height: 440px; object-fit: contain; padding: 28px; }
.card.feature div { padding: 32px 34px; align-self: center; }
.card.feature h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -0.015em; margin: 8px 0 12px; }
.card.feature p { font-size: 17px; }
@media (max-width: 760px) { .card.feature { grid-template-columns: 1fr; } .card.feature img { min-height: 0; aspect-ratio: 16 / 10; } .card.feature div { padding: 18px 20px 22px; } }
.card h2 { font-size: 21px; line-height: 1.25; margin: 6px 0 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }

/* Article: blog layout. Title block and body at reading width, hero image wider. */
article.post { padding: 28px 0 40px; }
.post-head, .post-body { max-width: 720px; margin: 0 auto; }
.post-head { text-align: center; }
.kicker { font-size: 13.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.kicker a { color: var(--faint); text-decoration: none; }
article h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 16px; }
.dek { font-size: 20px; line-height: 1.5; color: var(--muted); margin: 0 auto 14px; max-width: 640px; }
.meta { color: var(--faint); font-size: 14.5px; margin: 0; }
figure.hero { max-width: 1040px; margin: 36px auto 44px; }
figure.hero img { width: 100%; border-radius: 20px; box-shadow: var(--shadow); }
/* Graphics made for the page: drawn on the page colour, no frame or shadow. */
figure.hero.plain img { border-radius: 0; box-shadow: none; }
figure.graphic img { border-radius: 0; box-shadow: none; }
.answer { background: var(--tile); border: 1px solid var(--line); border-radius: 14px;
          padding: 18px 22px; margin: 0 0 32px; }
.answer p { margin: 0; color: var(--text); }
.answer p + p { margin-top: 8px; }
article h2 { font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; margin: 44px 0 10px; }
article h3 { font-size: 19px; margin: 28px 0 6px; }
article p, article li { color: #2A323B; }
article ol, article ul { padding-left: 22px; }
article li { margin: 6px 0; }
article li::marker { color: var(--accent); font-weight: 600; }
kbd { font: 500 14px "Onest", -apple-system, sans-serif; background: var(--tile); border: 1px solid var(--line);
      border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }
figure { margin: 28px 0; }
figure img { display: block; border-radius: 14px; box-shadow: 0 2px 6px rgba(27,39,51,.06), 0 18px 40px rgba(27,39,51,.12); }
figcaption { margin-top: 10px; font-size: 14.5px; color: var(--muted); text-align: center; }
.note { background: var(--band); border-radius: 14px; padding: 16px 20px; margin: 24px 0; font-size: 16px; }
.note p { margin: 0; }

/* Tables and bars */
.table { overflow-x: auto; margin: 22px 0; background: var(--tile); border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-weight: 600; color: var(--muted); font-size: 14px; background: var(--bg); }
tbody tr:last-child td { border-bottom: 0; }
td.best { font-weight: 600; color: var(--accent); }
.bars { margin: 22px 0; display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 92px 1fr 84px; align-items: center; gap: 12px; font-size: 15.5px; }
.bar b { font-weight: 600; }
.bar i { display: block; height: 22px; border-radius: 6px; background: #C7CED6; width: var(--w); min-width: 4px; }
.bar.top i { background: var(--brand); }
.bar span { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Call to action */
.cta-box { background: var(--ink); color: #fff; border-radius: 20px; padding: 28px; margin: 44px 0 8px;
           display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: center; }
.cta-box img { width: 72px; height: 72px; }
.cta-box h2 { color: #fff; margin: 0 0 6px; font-size: 22px; }
.cta-box p { color: rgba(255,255,255,.72); margin: 0 0 14px; font-size: 16px; }
.cta-box a.btn { display: inline-block; background: var(--brand); color: #fff; text-decoration: none; font-weight: 600;
                 padding: 10px 18px; border-radius: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
/* Apple’s official badge, unchanged as Apple’s guidelines ask. */
.cta-box .store-badge { display: inline-block; line-height: 0; transition: translate .18s ease; }
.cta-box .store-badge img { height: 48px; width: auto; }
.cta-box .store-badge:hover { translate: 0 -2px; }
@media (max-width: 560px) { .cta-box { grid-template-columns: 1fr; } }
.more { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; }
.more h2 { font-size: 18px; margin: 0 0 10px; }

.credits { margin: 32px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.55; }
.credits h2 { font-size: 13.5px; margin: 0 0 4px; color: var(--muted); }
.credits p { margin: 0 0 4px; color: var(--faint); }
.credits a { color: var(--muted); }
.back { text-align: center; margin: 40px 0 0; }
.back-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--tile); border: 1px solid var(--line);
            border-radius: 12px; padding: 11px 18px 11px 14px; font-weight: 500; font-size: 15.5px; text-decoration: none;
            color: var(--text); box-shadow: 0 1px 2px rgba(27,39,51,.05); transition: box-shadow .2s ease, transform .2s ease; }
.back-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(27,39,51,.06), 0 10px 22px rgba(27,39,51,.10); }
.back-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.related h2 { margin-bottom: 14px; }
.rel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rel { display: flex; flex-direction: column; background: var(--tile); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
       text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.rel:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(27,39,51,.06), 0 14px 28px rgba(27,39,51,.10); }
.rel img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; box-shadow: none; border-radius: 0; }
.rel .kind { margin: 14px 18px 0; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.rel b { margin: 4px 18px 18px; font-size: 17px; line-height: 1.3; font-weight: 600; color: var(--text); }
@media (max-width: 560px) { .rel-grid { grid-template-columns: 1fr; } }

footer { border-top: 1px solid var(--line); padding: 32px 0 56px; color: var(--faint); font-size: 14px;
         display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer a { text-decoration: none; color: var(--muted); }

@media (max-width: 640px) {
  header nav .hide-sm, .brand span { display: none; }
  .bar { grid-template-columns: 70px 1fr 70px; font-size: 14.5px; }
}
.card img.photo { object-fit: cover; padding: 0; }
