/* iwriter_guides.css — shared by every page in /guides. Reuses tokens, header, footer, buttons and popup. */
@import url("../intelligent_writer.css");

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 50; background: var(--accent); }
.guide { max-width: 72rem; margin: 0 auto; padding: 2rem var(--pad-x) 4rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85rem; color: var(--ink-soft); margin-bottom: 2rem; }
.crumbs a:hover { color: var(--accent); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: clamp(2rem, 5vw, 5rem); align-items: start; }

.kind { color: var(--accent); font-weight: 500; font-size: .9rem; margin-bottom: .75rem; }
.title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
.intro { margin-top: 1.25rem; font-size: 1.15rem; line-height: 1.65; color: var(--ink-soft); font-weight: 300; max-width: 40rem; }
.updated { margin-top: .75rem; font-size: .85rem; color: var(--ink-soft); }

.box { margin-top: 2rem; padding: 1.25rem 1.5rem; border-radius: .75rem; background: var(--surface-alt); border: 1px solid var(--border); }
.box__h { font-size: 1rem; font-weight: 600; margin-bottom: .6rem; }
.box ul { padding-left: 1.2rem; line-height: 1.7; color: var(--ink-soft); }
.box--tips { border-left: 4px solid var(--accent); }
.box--warn { border-left: 4px solid #e8a317; }

.part { margin-top: 3rem; }
.part__label { font-size: .85rem; color: var(--accent); font-weight: 500; margin-bottom: .35rem; }
.guide .h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.steps { list-style: none; margin-top: 1.5rem; }
.step { display: grid; grid-template-columns: 3.25rem 1fr; gap: 1.25rem; padding: 1.5rem 0; border-top: 1px solid var(--border); scroll-margin-top: 6rem; }
.step__n { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-serif); font-size: 1.3rem; font-weight: 500; color: var(--accent); background: var(--accent-tint); transition: background .2s, color .2s; }
.step__n:hover { background: var(--accent-tint); box-shadow: 0 0 0 2px var(--accent); }
.step__n[aria-pressed="true"] { background: var(--accent); color: var(--surface); }
.step__h { font-size: 1.15rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.step p { margin-top: .5rem; line-height: 1.7; color: var(--ink-soft); max-width: 38rem; }
.step.is-done .step__h { color: var(--ink-soft); text-decoration: line-through; text-decoration-thickness: 1px; }
.end { margin-top: 3rem; }

.toc { position: sticky; top: 6rem; font-size: .92rem; }
.toc__h { font-size: .95rem; font-weight: 600; margin-bottom: .75rem; }
.toc ol { list-style: none; border-left: 1px solid var(--border); }
.toc li a, .toc__part { display: block; padding: .4rem 0 .4rem 1rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-soft); line-height: 1.4; }
.toc__part { font-weight: 600; color: var(--ink); }
.toc li a:hover { color: var(--accent); }
.toc li a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }

.related { margin-top: 4.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.related__grid--list { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--border); margin-top: 2.5rem; }
.rel { display: flex; flex-direction: column; gap: .35rem; padding: 1.25rem 1.4rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--surface); transition: border-color .2s; }
.rel:hover { border-color: var(--accent); }
.rel__kind { font-size: .8rem; color: var(--accent); font-weight: 500; }
.rel__title { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 500; line-height: 1.3; }
.rel__desc { color: var(--ink-soft); font-size: .95rem; line-height: 1.55; }
.rel--row { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 1.5rem .25rem; background: none; }
.rel--row:hover { background: var(--accent-tint2); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; margin-bottom: 1rem; }
}
@media print { .site-header, .progress, .toc, .related, .end, .site-footer { display: none; } }

.step .shot { max-width: 38rem; }
.title + .intro + .shot { max-width: 42rem; }
.rel--row { flex-direction: row; align-items: center; gap: 1.5rem; }
.rel__text { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
@media (max-width: 600px) { .rel--row { flex-direction: column; align-items: stretch; } .shot--thumb { width: 100%; } }
