/* Guides, auth, legal and error pages */

.page-hero { padding: clamp(40px, 7vw, 90px) 0 10px; }

/* --------------------------------------------------------------- guides --- */
.guides-hero { padding: clamp(36px, 6vw, 80px) 0 30px; }
.guides-hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.guides-hero-art .paint img { aspect-ratio: 1100 / 760; }
@media (max-width: 900px) { .guides-hero-grid { grid-template-columns: 1fr; } .guides-hero-art { order: -1; max-width: 560px; } }

.progress-card { padding: 20px 22px; margin-top: 24px; max-width: 460px; }
.progress-card.inline { max-width: none; margin: 0 0 28px; }
.progress-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: .95rem; }
.progress-bar { height: 8px; border-radius: 99px; background: var(--paper-3); overflow: hidden; --p: 0%; }
.progress-bar span { display: block; height: 100%; width: var(--p); background: linear-gradient(90deg, var(--sea-2), var(--sap)); border-radius: inherit; transition: width .6s var(--ease); }
.progress-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; counter-reset: ps; }
.progress-steps li { counter-increment: ps; display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: .95rem; }
.progress-steps li::before { content: counter(ps); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 .78rem var(--font-body); background: var(--paper-3); color: var(--ink-3); flex: none; }
.progress-steps li.is-done { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 40%, transparent); }
.progress-steps li.is-done::before { content: '✓'; background: var(--sap); color: #fff; }
.progress-foot { margin: 12px 0 0; font-size: .88rem; }

.guides-featured { padding: 20px 0 30px; }
.featured-guide { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s var(--ease), box-shadow .2s; }
.featured-guide:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.featured-art { background: var(--card-2); }
.featured-art .paint img { aspect-ratio: 900 / 640; object-fit: cover; height: 100%; }
.featured-copy { padding: clamp(24px, 4vw, 48px); align-self: center; }
.featured-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-top: 12px; }
@media (max-width: 760px) { .featured-guide { grid-template-columns: 1fr; } }

.guide-group { padding: 34px 0 10px; }
.group-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.group-head h2 { font-size: 1.7rem; margin: 0; }
.group-head p { margin: 0; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.guide-card { text-decoration: none; color: inherit; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.guide-card:hover { color: inherit; transform: translateY(-3px); box-shadow: var(--shadow); }
.guide-card-art { background: var(--card-2); border-bottom: 1px solid var(--line); }
.guide-card-art .paint img { aspect-ratio: 16 / 9; object-fit: cover; }
:root[data-theme='dark'] .guide-card-art .paint.sheet { margin: 10px 10px 0; }
.guide-card-body { padding: 16px 18px 20px; }
.guide-card h3 { font-size: 1.2rem; margin: 6px 0 6px; }
.guide-card p { color: var(--ink-2); font-size: .94rem; margin: 0; }
.guide-meta { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: .84rem; }
.guide-meta .chip-icon { width: 22px; height: 22px; }
.guide-meta .chip-icon svg { width: 12px; height: 12px; }
.done-pill { display: none; font-weight: 600; color: var(--sap); background: var(--sap-wash); border-radius: 99px; padding: 1px 8px; font-size: .74rem; }
.guide-card.is-done .done-pill { display: inline; }

.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding: 36px 0 60px; }
.guide-nav { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: .93rem; padding-right: 6px; }
.guide-back { display: inline-block; margin-bottom: 18px; text-decoration: none; color: var(--ink-2); font-weight: 600; }
.guide-nav-title { font: 600 .74rem var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 18px 0 8px; }
.guide-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.guide-nav a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); line-height: 1.35; }
.guide-nav a:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); }
.guide-nav a[aria-current='page'] { background: var(--sea-wash); color: var(--sea); font-weight: 600; }
.guide-nav li.is-done a::after { content: ' ✓'; color: var(--sap); }
@media (max-width: 900px) { .guide-layout { grid-template-columns: 1fr; } .guide-nav { display: none; } }

.guide { max-width: 760px; }
.guide-crumb { font-size: .9rem; color: var(--ink-3); margin-bottom: 8px; }
.guide-crumb a { color: inherit; }
.guide-head h1 { margin-bottom: 12px; }
.guide-art { margin: 24px 0 28px; }
.guide-art .paint img { max-height: 380px; object-fit: contain; }
.guide-body { font-size: 1.04rem; }
.guide-section { margin-bottom: 36px; }
.guide-section h2 { font-size: 1.55rem; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-done { display: none; font: 600 .78rem var(--font-body); color: var(--sap); background: var(--sap-wash); padding: 3px 9px; border-radius: 99px; letter-spacing: 0; }
.guide-section.is-done .step-done { display: inline-block; }
.guide-body p, .guide-body li { color: var(--ink-2); }
.guide-body strong { color: var(--ink); }
.guide-body ol, .guide-body ul { padding-left: 1.3em; display: grid; gap: 6px; margin: 0 0 1em; }
.guide-body pre { background: var(--paper-3); padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .88rem; line-height: 1.6; }
.guide-body pre code { background: none; padding: 0; }
.tip { position: relative; background: var(--ochre-wash); border-radius: var(--radius); padding: 14px 18px 14px 18px; margin: 18px 0; }
.tip p { margin: 0; color: var(--ink) !important; }
.tip-label { position: absolute; top: -14px; left: 14px; font-size: 1.3rem; color: var(--ochre); }
.tip.note { background: var(--sea-wash); }
.tip.note .tip-label { color: var(--sea); }
.do-it { margin: 20px 0 6px; }
.hl { padding: 0 4px; border-radius: 4px; }
.hl.ochre { background: var(--ochre-wash); color: var(--ochre); }
.hl.coral { background: var(--coral-wash); color: var(--coral); }
.shot { margin: 22px 0; }
.shot img { height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.shot figcaption { font-size: .86rem; color: var(--ink-3); margin-top: 10px; text-align: center; }
.guide-foot { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 40px; }
.next-guide { display: grid; gap: 4px; padding: 20px 22px; text-decoration: none; color: inherit; transition: transform .2s var(--ease), box-shadow .2s; }
.next-guide:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.next-guide strong { font: 600 1.2rem var(--font-display); }
.guide-help { padding: 20px 22px; box-shadow: var(--shadow-sm); }
.guide-help p { font-size: .94rem; color: var(--ink-2); }
@media (max-width: 640px) { .guide-foot { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- auth --- */
.auth-page { background-image: var(--paper-tex); }
.auth { display: grid; grid-template-columns: minmax(380px, 1fr) 1.1fr; min-height: 100vh; min-height: 100dvh; }
.auth-form-side { display: flex; flex-direction: column; padding: 24px clamp(24px, 5vw, 64px); }
.auth-top { display: flex; justify-content: space-between; align-items: center; }
.auth-form-wrap { width: 100%; max-width: 420px; margin: auto; padding: 32px 0; }
.auth-title { font-size: clamp(2.6rem, 5vw, 3.6rem); margin-bottom: 8px; }
.auth-form { margin-top: 26px; }
.auth-submit { width: 100%; margin-top: 6px; }
.auth-demo { width: 100%; }
.auth-or { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: .88rem; margin: 18px 0; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-switch { margin-top: 22px; color: var(--ink-2); font-size: .95rem; text-align: center; }
.auth-foot { font-size: .82rem; text-align: center; margin: 0; }
.auth-art { position: relative; overflow: hidden; background: var(--paper-2); border-left: 1px solid var(--line); }
.auth-art .paint { position: absolute; inset: 0; }
.auth-art .paint img { width: 100%; height: 100%; object-fit: cover; }
:root[data-theme='dark'] .auth-art { background: #f4efe4 url(/art/paper.webp?v=ca10e3ed6b); }
:root[data-theme='dark'] .auth-art .paint img { mix-blend-mode: multiply; }
.auth-quote { position: absolute; left: 8%; right: 8%; bottom: 7%; margin: 0; font: italic 500 clamp(1.1rem, 1.8vw, 1.45rem)/1.4 var(--font-display); color: #23263a; text-shadow: 0 1px 12px rgba(251,247,239,.9); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 70px; }
.pw-wrap .btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.pw-meter { display: flex; gap: 4px; align-items: center; margin-top: 2px; }
.pw-meter i { width: 34px; height: 4px; border-radius: 4px; background: var(--paper-3); transition: background .2s; }
.pw-meter span { margin-left: 8px; font-size: .82rem; color: var(--ink-3); }
.pw-meter[data-score='1'] i:nth-child(-n+1), .pw-meter[data-score='2'] i:nth-child(-n+2) { background: var(--ochre); }
.pw-meter[data-score='3'] i:nth-child(-n+3), .pw-meter[data-score='4'] i:nth-child(-n+4) { background: var(--sap); }
.draft-note { padding: 16px 18px; margin: 18px 0 0; background: var(--sea-wash); border-color: transparent; box-shadow: none; }
.draft-note .hand { color: var(--sea); font-size: 1.3rem; }
.draft-note p { margin: 4px 0 0; color: var(--ink); }
.draft-note .small { font-size: .85rem; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}

/* ---------------------------------------------------------------- legal --- */
.legal { padding: clamp(40px, 6vw, 80px) 0; }
.legal h2:not(.h2) { font-size: 1.45rem; letter-spacing: -0.01em; margin-top: 1.8em; }
.legal li, .legal p { color: var(--ink-2); }

/* -------------------------------------------------------------- 404/500 --- */
.lost { padding: clamp(30px, 5vw, 60px) 0 clamp(60px, 8vw, 100px); }
.lost-art { max-width: 720px; margin: 0 auto 10px; }

/* OAuth consent (server/oauth.js) */
.consent-card { margin-top: 22px; padding: 18px 20px; }
.consent-card p { margin: 0 0 8px; }
.consent-list { margin: 0 0 12px; padding-left: 1.2em; line-height: 1.6; }
.consent-form .auth-demo { margin-top: 10px; }

/* ------------------------------------------------------------ enterprise --- */
.ent-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.ent-hero .lede { max-width: 560px; }
.ent-art img { aspect-ratio: 640 / 420; object-fit: cover; }
.ent-section { padding: clamp(48px, 6vw, 80px) 0 0; }
.ent-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.ent-item { padding: 18px 20px 18px 46px; position: relative; font-weight: 600; }
.ent-item::before { content: ''; position: absolute; left: 20px; top: 23px; width: 12px; height: 7px; border-left: 2px solid var(--sap); border-bottom: 2px solid var(--sap); transform: rotate(-45deg); }
.ent-who { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ent-who-card { padding: 24px 26px; }
.ent-who-card h3 { font-size: 1.25rem; margin: 0 0 8px; }
.ent-who-card p { color: var(--ink-2); margin: 0; line-height: 1.55; }
@media (max-width: 860px) { .ent-who { grid-template-columns: 1fr; gap: 12px; } }
.ent-form-card { padding: clamp(22px, 4vw, 36px); }
.ent-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ent-submit { width: 100%; margin: 6px 0 12px; }
.ent-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ent-done { text-align: center; padding: 20px 0; }
.ent-done .hand { color: var(--sea); font-size: 1.4rem; }
.ent-done h3 { margin: 6px 0; }
@media (max-width: 860px) { .ent-hero-grid { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 600px) { .ent-row { grid-template-columns: 1fr; } }

/* /cli: commands with a Copy button (server/pages/cli.js) */
.cli-cmd { position: relative; margin: 0 0 1em; }
.cli-cmd pre { margin: 0; padding-right: 76px; }
.cli-copy { position: absolute; top: 8px; right: 8px; }
.cli-page .guide-section h2 { margin-top: 0; }
