/* Longo Mai guides. Palette: forest #4A5446, sage #E3E9E3, leaf #81AB71. Typeface: Open Sans. */
.hb.lmb { --navy: #4A5446; --soft: #E3E9E3; --slate: #5C6658; --hair: #C9D4C9; --edge: #6D7A68; }
.hb.lmb .hb-head { background: #4A5446; }
.hb.lmb .hb-head p { color: #E3E9E3; }
.hb.lmb .hb-pair { min-width: 56px; margin-right: 6px; }
.hb.lmb .hb-aa { background: #E3E9E3; color: #4A5446; }
.hb.lmb .hb-use > div { color: #1F2A1F; }
.hb-dots.lmb-hex { gap: 6px; }
.hb-dots.lmb-hex svg { display: block; }
.lmb-fig { margin: 0; max-width: 760px; }
.lm-type, .lm-spec, .lm-surface { font-family: "Open Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; }
.lm-spec { display: grid; }
.lm-spec > div { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line); }
.lm-spec small { color: var(--muted); font-size: .85rem; font-family: inherit; }
.lm-spec .t1 { font-size: 40px; font-weight: 700; line-height: 1.15; color: #4A5446; }
.lm-spec .t2 { font-size: 28px; font-weight: 600; line-height: 1.25; color: #4A5446; }
.lm-spec .t3 { font-size: 20px; font-weight: 600; line-height: 1.3; color: #4A5446; }
.lm-spec .t4 { font-size: 17px; line-height: 1.65; max-width: 62ch; color: var(--ink); }
.lm-spec .t5 { font-size: 14px; color: var(--muted); }
.lm-spec .t6 { font-size: 15px; font-weight: 600; color: #4A5446; }
:root[data-theme="dark"] .lm-spec .t1, :root[data-theme="dark"] .lm-spec .t2, :root[data-theme="dark"] .lm-spec .t3, :root[data-theme="dark"] .lm-spec .t6 { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lm-spec .t1, :root:not([data-theme="light"]) .lm-spec .t2, :root:not([data-theme="light"]) .lm-spec .t3, :root:not([data-theme="light"]) .lm-spec .t6 { color: var(--ink); } }

/* Components */
.lm-surface { --forest: #4A5446; --sage: #E3E9E3; --leaf: #81AB71; --ink: #1F2A1F; --deep: #3F6B33; --edge: #6D7A68;
  background: #fff; color: #1F2A1F; font-size: 17px; line-height: 1.65; }
.lm-surface, .lm-surface * { box-sizing: border-box; }
.lm-surface :is(h4, p, label, small, span, button, input, select, a, b) { font-family: inherit; }
.lmg { display: grid; min-width: 0; }
.lmg-comp { display: grid; gap: 16px; padding: clamp(20px, 3vw, 32px) 0; border-top: 1px solid var(--line); min-width: 0; }
@media (min-width: 860px) { .lmg-comp { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 32px; } }
.lmg-info h3 { margin: 0 0 6px; font-size: 1.15rem; letter-spacing: -.02em; }
.lmg-info p { margin: 0; max-width: 46ch; line-height: 1.55; color: var(--muted); }
.lmg-spec { padding: 20px; border: 1px solid #C9D4C9; border-radius: 6px; display: grid; gap: 16px; align-content: start; min-width: 0; max-width: 620px; }
.lmg-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.lm-btn { min-height: 44px; padding: 0 22px; border: 2px solid #81AB71; border-radius: 4px; background: #81AB71; color: #1F2A1F; font-weight: 700; font-size: 15px; cursor: pointer; }
.lm-btn.ghost { background: transparent; border-color: #4A5446; color: #4A5446; }
.lm-btn:disabled { opacity: .5; cursor: default; }
.lm-link { color: #3F6B33; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }
.lm-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lm-mark { font-weight: 600; letter-spacing: .04em; color: #4A5446; text-transform: uppercase; font-size: 14px; }
.lm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; font-weight: 600; }
.lm-nav a { color: #4A5446; text-decoration: none; padding: 10px 0; display: inline-block; }
.lm-nav a.on { color: #3F6B33; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.lm-hero { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 190px; padding: 24px; text-align: center; color: #fff; background: #2F3B2D; border-radius: 4px; }
.lm-hero b { font-size: 28px; font-weight: 700; line-height: 1.2; }
.lm-hero span { font-size: 16px; }
.lm-hero i { font-style: normal; font-size: 28px; line-height: 1; }
.lm-sh h4 { margin: 0; padding-bottom: 10px; font-size: 22px; font-weight: 600; color: #4A5446; border-bottom: 2px solid #81AB71; text-align: center; }
.lm-sh p { margin: 14px 0 0; font-size: 16px; line-height: 1.6; }
.lm-teasers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.lm-teasers article { background: #E3E9E3; padding: 18px; border-radius: 4px; display: grid; gap: 6px; align-content: start; }
.lm-teasers h4 { margin: 0; font-size: 18px; color: #4A5446; }
.lm-teasers p { margin: 0; font-size: 15px; line-height: 1.55; }
.lm-ref { margin: 0; font-size: 17px; }
.lm-ref sup { font-size: 12px; }
.lm-ref sup a { color: #3F6B33; font-weight: 700; padding: 0 2px; }
.lm-form { display: grid; gap: 14px; }
.lm-field { display: grid; gap: 6px; }
.lm-field label { font-size: 14px; font-weight: 600; color: #4A5446; }
.lm-field :is(input, select) { height: 44px; padding: 0 12px; border: 1.5px solid #6D7A68; border-radius: 4px; background: #fff; font-size: 16px; color: #1F2A1F; }
.lm-err { margin: 0; color: #B3261E; font-size: 14px; font-weight: 600; }
.cs-section:has(.lmg) .cs-label, .cs-section:has(.hb) .cs-label { position: static; }

/* Site map, laid out across the page */
.lm-tree, .lm-tree ul { list-style: none; margin: 0; padding: 0; }
.lm-tree { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 28px 14px; padding-top: 22px; align-items: start; }
.lm-tree::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; border-top: 1px solid var(--line); }
.lm-tree > li { position: relative; line-height: 1.35; min-width: 0; }
.lm-tree > li::before { content: ""; position: absolute; left: 24px; top: -22px; height: 22px; border-left: 1px solid var(--line); }
.lm-tree .n { display: inline-block; padding: 6px 12px; border: 1px solid #4A5446; border-radius: 4px; font-weight: 700; background: var(--paper); }
.lm-tree .n.start { background: #4A5446; color: #fff; border-color: #4A5446; }
.lm-tree .n.lang { border-style: dashed; }
.lm-tree .alt { display: block; margin: 6px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.4; }
.lm-tree ul { margin: 6px 0 0 14px; padding-left: 20px; }
.lm-tree ul > li { position: relative; padding: 5px 0; }
.lm-tree ul > li::before { content: ""; position: absolute; left: -20px; top: 22px; width: 14px; border-top: 1px solid var(--line); }
.lm-tree ul > li::after { content: ""; position: absolute; left: -20px; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.lm-tree ul > li:first-child::after { top: -8px; }
.lm-tree ul > li:last-child::after { bottom: auto; height: 22px; }
.lm-tree ul .n { font-weight: 600; font-size: .92rem; }

/* Design process */
.lm-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 28px 24px; counter-reset: none; }
.lm-steps li { border-top: 3px solid #81AB71; padding-top: 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.lm-steps .num { font-size: 1.9rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; color: var(--muted); font-variant-numeric: tabular-nums; }
.lm-steps h3 { margin: 4px 0 0; font-size: 1.25rem; letter-spacing: -.02em; }
.lm-steps p { margin: 0; line-height: 1.5; font-size: .95rem; }
.lm-steps .what { font-weight: 700; font-size: .85rem; letter-spacing: .01em; color: var(--muted); }
.lm-steps a { font-weight: 700; font-size: .95rem; }

/* Spacing, layout and shape specimens */
.lm-space { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); }
.lm-space li { display: grid; grid-template-columns: 44px 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 16px; font-size: .95rem; }
.lm-space li + li { border-top: 1px solid var(--line); }
.lm-space b { font-variant-numeric: tabular-nums; }
.lm-space i { display: block; height: 14px; background: #81AB71; border-radius: 2px; }
@media (max-width: 560px) { .lm-space li { grid-template-columns: 36px 64px minmax(0, 1fr); gap: 8px; padding: 10px 12px; } }
.lm-grid { padding: 16px; border-radius: 8px; background: #E3E9E3; color: #1F2A1F; font-size: .82rem; }
.lm-page { padding: 16px clamp(12px, 8%, 56px); border: 1px dashed #6D7A68; border-radius: 4px; display: grid; gap: 10px; }
.lm-wrap { display: grid; gap: 10px; padding: 12px; background: #fff; border: 1px solid #81AB71; border-radius: 4px; }
.lm-text { height: 56px; width: min(100%, 65%); padding: 6px 8px; background: #E3E9E3; border-radius: 3px; }
.lm-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lm-row3 span { padding: 12px 8px; text-align: center; background: #E3E9E3; border-radius: 3px; font-weight: 600; }
.lm-grid .cap { display: block; font-weight: 600; }
.lm-shapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.lm-shapes figure { margin: 0; display: grid; gap: 10px; }
.lm-shapes figcaption { font-size: .88rem; color: var(--muted); line-height: 1.4; }
.lm-shapes figcaption b { display: block; color: var(--ink); font-size: .95rem; }
.lm-sample { display: grid; place-items: center; min-height: 96px; padding: 16px; background: #fff; border: 1px solid #C9D4C9; border-radius: 8px; }
.lm-rulebox b { display: block; padding-bottom: 8px; border-bottom: 2px solid #81AB71; color: #4A5446; font-size: 1.05rem; }
.lm-focus { display: inline-block; padding: 8px 18px; border-radius: 4px; background: #81AB71; color: #1F2A1F; font-weight: 700; outline: 3px solid #3F6B33; outline-offset: 2px; }

/* Type rules, shown rather than listed */
.lm-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px 20px; }
.lm-rule { display: grid; gap: 8px; align-content: start; min-width: 0; }
.lm-rule h5 { margin: 0; font-size: 1rem; }
.lm-rule .r { margin: 0; color: var(--muted); font-size: .9rem; }
.lm-rule .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lm-rule .pair > div { display: grid; gap: 8px; align-content: start; min-width: 0; padding: 12px; background: #fff; color: #1F2A1F; border: 1px solid #C9D4C9; border-radius: 6px; border-top-width: 3px; }
.lm-rule .yes { border-top-color: #0B6B5C !important; }
.lm-rule .no { border-top-color: #B3261E !important; }
.lm-rule .tag { font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.lm-rule .yes .tag { color: #0B6B5C; }
.lm-rule .no .tag { color: #B3261E; }
.lm-rule p { margin: 0; }
.lm-rule small { color: #5C6658; font-size: .8rem; }
.lm-rule .m { font-size: 15px; line-height: 1.6; }
.lm-rule .m.ok { max-width: 68ch; }
.lm-rule .m.wide { max-width: none; }
.lm-rule.full-row { grid-column: 1 / -1; }
.lm-rule.full-row .pair { grid-template-columns: 1fr; }
.lm-rule .ruler { display: block; position: relative; height: 10px; border-left: 2px solid #4A5446; border-right: 2px solid #4A5446; border-bottom: 2px solid #4A5446; margin-top: 4px; }
.lm-rule .ruler b { position: absolute; left: 0; right: 0; top: 8px; text-align: center; font-size: .72rem; font-weight: 700; color: #4A5446; }
.lm-rule .ruler { margin-bottom: 18px; }
.lm-rule .ruler { font-size: 15px; width: 68ch; max-width: 100%; }
.lm-rule .ruler.bad { width: 100%; border-color: #B3261E; }
.lm-rule .ruler.bad b { color: #B3261E; }
.lm-rule .s17 { font-size: 17px; }
.lm-rule .s12 { font-size: 12px; }
.lm-rule .h { font-size: 20px; font-weight: 600; line-height: 1.3; }
.lm-rule .h.ok { color: #4A5446; }
.lm-rule .h.leaf { color: #81AB71; }
.lm-rule .e { font-size: 15px; line-height: 1.5; }
.lm-rule .caps { text-transform: uppercase; letter-spacing: .04em; font-size: 13px; }
.lm-rule .lm-link2 { color: #3F6B33; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.lm-rule .faint { color: #81AB71; }
.lm-rule sup { font-size: 12px; }
.lm-rule sup a { color: #3F6B33; font-weight: 700; text-decoration: none; padding: 0 3px; }
.lm-rule sup a.focused { outline: 3px solid #3F6B33; outline-offset: 1px; border-radius: 2px; }
.lm-rule .tiny { font-size: 7px; vertical-align: super; color: #5C6658; }
@media (max-width: 560px) { .lm-rule .pair { grid-template-columns: 1fr; } }

/* Wireframes: never taller than the window, so each one can be seen without scrolling */
#wireframes .shot img { width: 100%; height: auto; max-height: calc(100vh - 170px); object-fit: contain; background: #fff; }

/* Working shades: compact grid to save space */
.hb.lmb .hb-work { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); border: 0; border-radius: 0; background: none; overflow: visible; gap: 0 28px; }
.hb.lmb .hb-work > div { grid-template-columns: 36px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.hb.lmb .hb-work > div + div { border-top: 1px solid var(--line); }
.hb.lmb .hb-work .chip { width: 36px; height: 36px; border-radius: 8px; }
.hb.lmb .hb-work > div > div { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: baseline; }
.hb.lmb .hb-work b { display: contents; font-size: .98rem; }
.hb.lmb .hb-work .tag { grid-column: 1 / -1; grid-row: 2; display: block; margin: 0; padding: 0; background: none; color: var(--muted); font-size: .85rem; font-weight: 400; }
.hb.lmb .hb-work code { grid-column: 2; grid-row: 1; }
@media (max-width: 560px) { .hb.lmb .hb-work .chip { width: 36px; height: 36px; } }

/* Editorial theme (2026-11-19): case-study chrome follows the portfolio theme. The prototype and brand specimens keep the project's own colours. */
.lm-steps li { border-top: 3px solid var(--rule); }
.lm-steps li:first-child { border-top-color: var(--accent); }
.lm-steps .num { font-family: var(--display); font-weight: 400; color: var(--accent); }
