/* The 90/90 Lab — Legal Growth Lab design system. Self-contained: system fonts only. */
:root {
  --ink: #1b2a41;
  --ink-deep: #131f31;
  --ink-soft: #3d4c63;
  --paper: #f7f4ee;
  --card: #fffdf9;
  --line: #e6dfd0;
  --gold: #b8934a;
  --gold-deep: #97753a;
  --gold-soft: #f3ead7;
  --green: #2e7d5b;
  --green-soft: #e7f2ec;
  --red: #a4373a;
  --red-soft: #f7e9e9;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(27, 42, 65, .06), 0 8px 24px rgba(27, 42, 65, .07);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--paper);
  line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3, .display { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; margin-bottom: .35rem; }
h2 { font-size: 1.25rem; margin-bottom: .6rem; }
h3 { font-size: 1.05rem; margin-bottom: .3rem; }
h4 { font-size: 1rem; margin: .9rem 0 .35rem; }
a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
p { margin-bottom: .6rem; }
.muted { color: #77808f; }
.small { font-size: .82rem; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; font-weight: 700; color: var(--gold-deep); margin-bottom: .4rem; }
.kicker a { color: inherit; text-decoration: none; }
.lede { font-size: 1.05rem; color: var(--ink-soft); max-width: 62ch; margin-bottom: 1rem; }
.error { background: var(--red-soft); color: var(--red); padding: .6rem .9rem; border-radius: 8px; margin-bottom: .8rem; }
.successnote { background: var(--green-soft); color: var(--green); padding: .6rem .9rem; border-radius: 8px; margin-bottom: .8rem; }
.notice { margin-top: 1rem; color: var(--ink-soft); }
.hidden { display: none; }

/* --- chrome --- */
.topbar {
  display: flex; align-items: center; gap: 1.6rem; padding: .7rem 1.4rem;
  background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; }
.brand-mark {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--gold);
  border: 1.5px solid var(--gold); border-radius: 8px; padding: .1rem .5rem; letter-spacing: .02em;
}
.brand-slash { opacity: .6; }
.brand-words { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 1.02rem; }
.brand-org { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #aeb8c8; }
.mainnav { display: flex; gap: .2rem; flex: 1; flex-wrap: wrap; }
.navlink { color: #cdd5e0; text-decoration: none; padding: .35rem .7rem; border-radius: 7px; font-size: .92rem; }
.navlink:hover { color: #fff; background: rgba(255,255,255,.08); }
.navlink.on { color: #fff; background: rgba(255,255,255,.14); }
.userbox { margin-left: auto; text-align: right; font-size: .82rem; line-height: 1.3; display: flex; flex-direction: column; }
.userbox-name { font-weight: 600; }
.userbox-firm { color: #aeb8c8; }
.inlineform { display: inline; }
.linkbtn { background: none; border: none; color: var(--gold-deep); cursor: pointer; font-size: .85rem; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-family: var(--sans); }
.topbar .linkbtn { color: var(--gold); }
.main { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 2rem 1.4rem 4rem; }
.main.wide { max-width: 1100px; }
.footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem; border-top: 1px solid var(--line); color: #8b93a1; font-size: .82rem; flex-wrap: wrap; }
.footer a { color: inherit; }
.footer-tag { font-family: var(--serif); font-style: italic; }

/* --- buttons, pills --- */
.btn { display: inline-block; border: none; border-radius: 8px; padding: .6rem 1.15rem; font-size: .95rem; font-weight: 600; cursor: pointer; text-decoration: none; font-family: var(--sans); transition: transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-deep); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn-green { background: var(--green); color: #fff; }
.btn-small { padding: .3rem .7rem; font-size: .82rem; }
.pill { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .04em; padding: .18rem .55rem; border-radius: 99px; vertical-align: middle; }
.pill-gold { background: var(--gold-soft); color: var(--gold-deep); }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-ink { background: #e3e8f0; color: var(--ink-soft); }
.pill-grey { background: #ecebe7; color: #8b93a1; }
.pill-red { background: var(--red-soft); color: var(--red); }

/* --- cards --- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); margin-bottom: 1.1rem; }
.card.empty { text-align: center; padding: 3rem 1.5rem; }

/* --- landing --- */
.hero-landing { text-align: center; padding: 3.5rem 0 2.5rem; }
.display { font-size: 3.2rem; margin: .4rem 0 .8rem; }
.hero-sub { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 1.6rem; }
.hero-ctas { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.landing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.landcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow); }
.landing-quote { text-align: center; padding: 2.5rem 1rem; }
.landing-quote blockquote { font-family: var(--serif); font-size: 1.3rem; font-style: italic; max-width: 42ch; margin: 0 auto .6rem; color: var(--ink-soft); }
.attribution { color: #8b93a1; font-size: .88rem; }

/* --- auth & forms --- */
.authcard { max-width: 460px; margin: 2rem auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.authcard.widecard { max-width: 660px; }
.stackform { display: flex; flex-direction: column; gap: .9rem; margin-top: .8rem; }
.stackform label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=datetime-local], select, textarea {
  font-family: var(--sans); font-size: .95rem; padding: .55rem .7rem; border: 1.5px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,147,74,.15); }
.formrow { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.formrow4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; }
.formdivider { margin-top: .6rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.chipset { border: none; display: flex; flex-wrap: wrap; gap: .45rem; }
.chipset legend { font-size: .88rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: .32rem .75rem; border: 1.5px solid var(--line); border-radius: 99px; font-size: .85rem; cursor: pointer; background: #fff; }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.trustnote { background: var(--gold-soft); border-radius: 8px; padding: .8rem 1rem; font-size: .87rem; color: var(--ink-soft); }
.protonote { background: #eef3fb; border: 1px dashed #b9c8e2; border-radius: 8px; padding: .7rem 1rem; font-size: .87rem; margin-bottom: .8rem; color: var(--ink-soft); }
.planrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; }
.plancard { position: relative; }
.plancard input { position: absolute; opacity: 0; }
.plancard-body { border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem; height: 100%; cursor: pointer; background: #fff; }
.plancard input:checked + .plancard-body { border-color: var(--gold); background: var(--gold-soft); }
.planprice { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; }
.planper { font-size: .85rem; color: #8b93a1; font-family: var(--sans); font-weight: 400; }

/* --- dashboard --- */
.dashhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.clockline { color: var(--ink-soft); }
.lapsed { background: var(--red-soft); color: var(--red); border-radius: 8px; padding: .7rem 1rem; max-width: 380px; font-size: .88rem; }
.modstrip { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; margin-bottom: 1.3rem; }
.mod { display: flex; flex-direction: column; gap: .1rem; padding: .6rem .7rem; border-radius: 9px; border: 1.5px solid var(--line); background: var(--card); text-decoration: none; min-width: 0; }
.mod-n { font-size: .68rem; font-weight: 800; letter-spacing: .08em; color: #8b93a1; }
.mod-t { font-family: var(--serif); font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-s { font-size: .72rem; color: #8b93a1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod.on { border-color: var(--gold); background: var(--gold-soft); }
.mod.on .mod-n { color: var(--gold-deep); }
.mod.locked { opacity: .62; cursor: default; }
.mod.open:hover, .mod.on:hover { border-color: var(--gold-deep); }
.dashgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.hero-card { grid-column: 1 / -1; }
.continue-card { border-left: 4px solid var(--gold); }
.bigstat-row { display: flex; gap: 2.5rem; flex-wrap: wrap; margin: .6rem 0 1rem; }
.bigstat { display: flex; flex-direction: column; }
.bigstat-n { font-family: var(--serif); font-size: 2.3rem; font-weight: 700; line-height: 1.1; }
.bigstat-target { font-size: 1.2rem; color: #8b93a1; }
.bigstat-l { font-size: .82rem; color: #77808f; max-width: 15ch; }
.progressbar { height: 8px; border-radius: 99px; background: #e9e4d8; overflow: hidden; margin-bottom: .8rem; }
.progressbar.slim { max-width: 420px; margin: .8rem 0 1.4rem; }
.progressbar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-deep)); border-radius: 99px; transition: width .3s; }
.win-line { color: var(--ink-soft); font-size: .92rem; }
.win-line.big { font-size: 1rem; margin-bottom: .4rem; }
.movement { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .6rem; }
.movementrow { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; border-bottom: 1px dashed var(--line); padding-bottom: .35rem; }
.movement-label { font-size: .88rem; color: var(--ink-soft); }
.movement-before { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }
.movement-arrow { color: var(--gold); margin: 0 .4rem; }
.movement-after { font-size: .8rem; }
.feeditem { border-bottom: 1px solid var(--line); padding: .55rem 0; }
.feeditem:last-of-type { border-bottom: none; }
.feedtitle { font-weight: 600; margin-bottom: .15rem; }
.feedbody { font-size: .9rem; color: var(--ink-soft); margin-bottom: .15rem; white-space: pre-line; }
.feedmeta { font-size: .78rem; color: #8b93a1; display: flex; gap: .6rem; align-items: center; }
.callitem { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.callitem:last-of-type { border-bottom: none; }
.calltitle { font-weight: 600; }
.activity { list-style: none; }
.activity li { padding: .3rem 0; font-size: .9rem; border-bottom: 1px dashed var(--line); }
.activity li:last-child { border-bottom: none; }

/* --- program & lessons --- */
.modcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.modcard h2 a { text-decoration: none; }
.lockedcard { opacity: .68; }
.lessonlist { display: flex; flex-direction: column; gap: .6rem; margin-top: 1rem; }
.lessonrow { display: flex; align-items: center; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; text-decoration: none; box-shadow: var(--shadow); }
.lessonrow:hover { border-color: var(--gold); }
.lessonstate { flex: 0 0 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #edf0f5; font-weight: 700; font-size: .9rem; color: var(--ink-soft); }
.lessonstate.done { background: var(--green-soft); color: var(--green); }
.lessonbody { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lessontitle { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; }
.lessonsub { font-size: .84rem; color: #77808f; }
.lessontags { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.donenote { font-size: .75rem; color: #8b93a1; }
.videoframe { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--ink-deep); margin-bottom: 1.1rem; box-shadow: var(--shadow); }
.videoframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.videoframe.placeholder { display: flex; align-items: center; justify-content: center; text-align: center; color: #aeb8c8; }
.videoframe.placeholder .muted { color: #77808f; }
.playmark { display: inline-flex; width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold); align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: .6rem; }
.keypoints { padding-left: 1.2rem; }
.keypoints li { margin-bottom: .45rem; }
.reslist { list-style: none; }
.reslist li { padding: .35rem 0; }
.lessondone { margin-top: 1.4rem; }
.doneflag { color: var(--green); font-weight: 600; }
.toolcard { border-left: 4px solid var(--gold); }
.toolcard-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: .4rem; }
.toolcard-cta { display: flex; flex-direction: column; gap: .4rem; align-items: flex-end; }

/* --- tool runner --- */
.toolhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.toolprogress { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; display: flex; flex-direction: column; align-items: flex-end; }
.savestate { font-family: var(--sans); font-size: .76rem; font-weight: 400; color: var(--green); }
.savestate.saving { color: var(--gold-deep); }
.toolintro { max-width: 70ch; color: var(--ink-soft); margin-bottom: 1.4rem; }
.toollayout { display: block; }
.toollayout.with-panel { display: grid; grid-template-columns: 1fr 320px; gap: 1.4rem; align-items: start; }
.toolform { display: flex; flex-direction: column; gap: 1.2rem; }
.toolsection { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.secnum { display: inline-flex; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ink); color: var(--gold); align-items: center; justify-content: center; font-size: .85rem; margin-right: .4rem; font-family: var(--sans); }
.secblurb { color: #77808f; font-size: .9rem; margin-bottom: 1rem; max-width: 65ch; }
.question { margin-bottom: 1.15rem; position: relative; }
.question:last-child { margin-bottom: 0; }
.qlabel { display: block; font-weight: 600; margin-bottom: .25rem; }
.qhelp { font-size: .83rem; color: #8b93a1; margin-bottom: .4rem; }
.qsaved { font-size: .72rem; color: #a2a9b4; position: absolute; right: 0; top: 0; }
.touchpoint { display: grid; grid-template-columns: 220px 1fr; gap: .6rem; }
.winblock { display: flex; flex-direction: column; gap: .5rem; background: #fbf9f4; border: 1px dashed var(--line); border-radius: 8px; padding: .8rem; }
.winrow { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: .5rem; }
.toolfinish { background: var(--ink); color: #e8ebf1; border-radius: var(--radius); padding: 1.4rem; }
.toolfinish h2 { color: #fff; }
.toolfinish .muted { color: #aeb8c8; }
.prefillpanel { background: var(--gold-soft); border: 1px solid #e5d5b3; border-radius: var(--radius); padding: 1rem 1.1rem; position: sticky; top: 4.4rem; max-height: calc(100vh - 6rem); overflow-y: auto; }
.prefillhead { display: flex; justify-content: space-between; align-items: baseline; }
.prefillart summary { cursor: pointer; font-weight: 600; font-family: var(--serif); padding: .4rem 0; }
.prefillbody { font-size: .82rem; background: #fff; border-radius: 8px; padding: .7rem .9rem; margin: .3rem 0 .8rem; max-height: 340px; overflow-y: auto; }
.prefillbody h3 { font-size: .92rem; margin-top: .7rem; }
.prefillbody h4 { font-size: .85rem; }
.prefillbody blockquote { border-left: 3px solid var(--gold); padding-left: .6rem; color: var(--ink-soft); margin: .4rem 0; }

/* --- workspace & artefacts --- */
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pagehead-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.artgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.artcard { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; text-decoration: none; box-shadow: var(--shadow); }
.artcard:hover { border-color: var(--gold); }
.artcard.running { border-style: dashed; border-color: var(--gold); background: var(--gold-soft); }
.versionrow { margin-bottom: .8rem; font-size: .9rem; }
.artefactbody { padding: 2rem 2.2rem; }
.artefactbody h2 { font-size: 1.3rem; margin: 1.4rem 0 .5rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.artefactbody h2:first-child { margin-top: 0; }
.artefactbody h3 { margin: 1rem 0 .4rem; }
.artefactbody blockquote { border-left: 3px solid var(--gold); padding: .3rem 0 .3rem .9rem; margin: .6rem 0 1rem; color: var(--ink-soft); font-family: var(--serif); font-size: 1.02rem; }
.artefactbody ul { padding-left: 1.3rem; margin-bottom: .8rem; }
.artefactbody li { margin-bottom: .3rem; }
.artefactbody em { color: #77808f; }
.tablewrap { overflow-x: auto; margin: .6rem 0 1rem; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: left; padding: .5rem .7rem; border: 1px solid var(--line); vertical-align: top; }
th { background: #f2eee5; font-family: var(--serif); }

/* --- team, calls --- */
.memberrow { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.memberrow:last-child { border-bottom: none; }
.inviterow { display: flex; flex-direction: column; gap: .3rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed var(--line); }
.invitelink { background: #f2eee5; border-radius: 6px; padding: .45rem .6rem; font-size: .78rem; word-break: break-all; cursor: pointer; }
.callcard-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.trustlist { display: flex; flex-direction: column; gap: 1.1rem; }
.trustlist h3 { color: var(--gold-deep); }

/* --- admin --- */
.adminbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.adminnav { display: flex; gap: .2rem; flex-wrap: wrap; }
.adminnav .navlink { color: var(--ink-soft); }
.adminnav .navlink:hover { background: #eae5da; color: var(--ink); }
.adminnav .navlink.on { background: var(--ink); color: #fff; }
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stattile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stattile-n { font-family: var(--serif); font-size: 2rem; font-weight: 700; }
.stattile-l { font-size: .82rem; color: #77808f; line-height: 1.35; }
.admintable { font-size: .86rem; }
.editsection { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .7rem; background: var(--card); }
.editsection legend { font-family: var(--serif); font-weight: 700; padding: 0 .4rem; }
.editq { display: flex; gap: .7rem; align-items: flex-start; }
.editq-n { flex: 0 0 1.5rem; height: 1.5rem; border-radius: 50%; background: #edf0f5; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; color: var(--ink-soft); margin-top: .3rem; }
.editq-fields { flex: 1; display: flex; flex-direction: column; gap: .35rem; }

@media (max-width: 860px) {
  .modstrip { grid-template-columns: repeat(3, 1fr); }
  .dashgrid { grid-template-columns: 1fr; }
  .toollayout.with-panel { grid-template-columns: 1fr; }
  .prefillpanel { position: static; max-height: none; }
  .formrow { grid-template-columns: 1fr; }
  .touchpoint { grid-template-columns: 1fr; }
  .winrow { grid-template-columns: 1fr; }
  .display { font-size: 2.3rem; }
  .mainnav { order: 3; width: 100%; }
  .topbar { flex-wrap: wrap; gap: .6rem; }
}
