:root {
  color-scheme: light;
  --paper: #f6f7f2;
  --white: #fff;
  --ink: #17241d;
  --muted: #52635a;
  --forest: #153a2f;
  --forest-deep: #102b23;
  --lime: #d7ec9d;
  --line: #dce1d7;
  --round: 14px;
  --sans: "DM Sans", "Aptos", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
main { flex: 1; }
a { color: inherit; text-underline-offset: .24em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
code, pre { font-family: var(--mono); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid #63917b; outline-offset: 4px; }
.shell { width: min(1112px, calc(100% - 64px)); margin-inline: auto; }
[hidden] { display: none !important; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; inset: .5rem auto auto .5rem; z-index: 3; background: var(--white); padding: .5rem 1rem; }

.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner { display: grid; grid-template-columns: auto 1fr auto; min-height: 74px; gap: 20px; align-items: center; }
.brand { display: inline-flex; gap: 10px; align-items: center; justify-self: start; text-decoration: none; font-size: .99rem; font-weight: 650; white-space: nowrap; }

/* The lockup: the official Cocunat wordmark followed by /ia. Its font-size is the height of the wordmark. */
.lockup { display: inline-flex; align-items: baseline; gap: .38em; margin: 0; font-size: 17px; font-weight: 400; letter-spacing: 0; line-height: 1; }
.wordmark { display: block; flex: none; width: auto; height: 1em; aspect-ratio: 134 / 20; }
.lockup-suffix { color: #3f6b57; font: 500 1.16em/1 var(--mono); letter-spacing: -.03em; white-space: nowrap; }
.topbar nav { display: flex; align-items: center; justify-content: center; column-gap: clamp(14px, 2.4vw, 30px); }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 650; padding-block: 25px; white-space: nowrap; }
.topbar nav a[aria-current] { color: var(--forest); box-shadow: inset 0 -2px var(--forest); }
.topbar nav a:hover { color: var(--ink); }
.publish-button { justify-self: end; }
.nav-group { display: flex; align-items: center; gap: clamp(12px, 1.8vw, 22px); }
.nav-group + .nav-group::before { content: ''; width: 1px; height: 22px; margin-right: clamp(2px, .6vw, 8px); background: var(--line); }
.nav-label { color: #647a6d; font: 600 .68rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.session { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.session-email { min-width: 0; max-width: 26ch; overflow: hidden; color: var(--muted); font-size: .82rem; font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.session-email:hover { color: var(--ink); text-decoration: underline; }
.session-email[aria-current] { color: var(--forest); }
.session form { margin: 0; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; font-size: .86rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.button-primary { background: var(--forest); color: var(--white); }
.button-primary:hover { background: var(--forest-deep); }
.button-outline { border-color: #bfc9be; background: transparent; color: var(--forest); }
.button-outline:hover { background: #e9eee4; }

.hero { margin-top: 37px; }
.hero-body { min-height: 356px; padding: clamp(32px, 5.2vw, 62px); display: grid; grid-template-columns: 1.22fr 1fr; gap: clamp(25px, 5vw, 66px); align-items: center; color: var(--white); border-radius: 21px; overflow: hidden; background: var(--forest); background-image: linear-gradient(90deg, #153a2f 25%, #153a2f00 80%), repeating-linear-gradient(90deg, #ffffff10 0 1px, transparent 1px 33px), repeating-linear-gradient(0deg, #ffffff10 0 1px, transparent 1px 33px); }
.eyebrow { font-size: .76rem; letter-spacing: .12em; font-weight: 750; text-transform: uppercase; }
.hero .eyebrow { display: flex; gap: 9px; align-items: center; margin-bottom: 15px; color: var(--lime); }
.hero .eyebrow span { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--lime); }
.hero h1 { font-size: clamp(2.85rem, 6vw, 5.15rem); font-weight: 730; letter-spacing: -.052em; line-height: .98; }
.hero h1 span { color: var(--lime); }
.hero-copy > p:last-child { color: #dae7dd; max-width: 355px; margin-top: 21px; font-size: clamp(.94rem, 1.5vw, 1.07rem); }
.terminal { color: #edf4ed; padding: 15px 20px 19px; min-width: 0; border: 1px solid #739264; border-radius: 12px; background: #102b23; box-shadow: 12px 12px 0 #0c211966; }
.terminal-bar { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #466052; color: #c8dacf; font: .73rem var(--mono); }
.terminal-dots { display: flex; gap: 4px; }
.terminal-dots i { width: 6px; height: 6px; background: #8ca690; border-radius: 50%; }
.terminal-dots i:first-child { background: var(--lime); }
.terminal-body { min-height: 110px; display: flex; align-items: start; gap: 9px; padding-block: 22px; font: clamp(.82rem, 1.55vw, 1.1rem)/1.6 var(--mono); }
.terminal-body > span, .terminal-body strong { color: var(--lime); }
.terminal-body strong { overflow-wrap: anywhere; }
.terminal a { color: #dce9df; font-size: .8rem; font-weight: 650; }

.catalog { padding-block: 43px 72px; scroll-margin-top: 16px; }
.catalog-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.catalog h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); letter-spacing: -.04em; line-height: 1.05; }
.catalog-heading > span { color: var(--muted); white-space: nowrap; font-size: .86rem; }
.search { display: flex; align-items: center; gap: 12px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.search-icon { position: relative; flex: 0 0 13px; height: 13px; margin-left: 11px; border: 1.7px solid #648174; border-radius: 50%; }
.search-icon::after { position: absolute; right: -5px; bottom: -3px; width: 6px; height: 1.7px; content: ''; display: block; transform: rotate(45deg); background: #648174; }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; border-radius: 4px; color: var(--ink); padding: 6px 3px; font-size: .93rem; }
.search input::placeholder { color: #5a685f; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 14px 21px; }
.filters a { border: 1px solid var(--line); color: var(--muted); border-radius: 100px; padding: 5px 13px; text-decoration: none; font-size: .81rem; font-weight: 650; }
.filters a[aria-current], .filters a:hover { color: var(--forest); border-color: #bfccac; background: #e7eddc; }
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.skill-card, .panel, .empty { border: 1px solid var(--line); border-radius: var(--round); background: var(--white); }
.skill-card { min-width: 0; min-height: 214px; display: flex; flex-direction: column; padding: 18px 19px 15px; }
.skill-card:hover { border-color: #92ae9d; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-mark { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 auto; border-radius: 9px; background: #eff0e5; color: var(--forest); font: 1.1rem var(--mono); }
.mark-operaciones { background: #e0ecd9; color: #2e5a41; }
.mark-desarrollo { background: #e4ebf6; color: #344b72; }
.mark-contenido { background: #f4e7df; color: #714d3d; }
.mark-datos { background: #efe7f6; color: #5a3d6c; }
.category { color: var(--muted); font-size: .74rem; }
.skill-card h3 { margin-top: 12px; font-size: 1.15rem; line-height: 1.25; letter-spacing: -.026em; overflow-wrap: anywhere; }
.skill-card h3 a { display: flex; justify-content: space-between; gap: 6px; text-decoration: none; }
.skill-card h3 a:hover { text-decoration: underline; }
.skill-card h3 span { color: #5b7f6b; font-size: .95rem; }
.skill-card p { margin-block: 7px 16px; flex: 1; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.card-footer { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #edf0ea; padding-top: 9px; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.card-footer code { color: #3e594a; }
.empty { min-height: 174px; display: grid; align-content: center; justify-items: center; padding: 24px; gap: 6px; text-align: center; }
.empty-mark { background: #e8eee1; color: var(--forest); border-radius: 8px; padding: 7px 11px; font: 600 .95rem var(--mono); }
.empty h2, .empty h3 { margin-top: 3px; font-size: 1.02rem; }
.empty a, .empty p { color: var(--muted); font-size: .87rem; }
.pagination { display: flex; justify-content: space-between; gap: 12px; margin-top: 17px; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; padding-block: 21px; }
.footer .shell { display: flex; justify-content: space-between; gap: 10px; }

.content-page { padding-block: 32px 64px; }
.back { display: inline-block; color: var(--forest); font-weight: 650; font-size: .86rem; margin-bottom: 22px; }
.content-page h1 { font-size: clamp(2.3rem, 4.5vw, 4.15rem); letter-spacing: -.065em; line-height: 1.04; overflow-wrap: anywhere; }
.lede { color: var(--muted); margin-block: 12px 25px; max-width: 66ch; overflow-wrap: anywhere; }
.detail-heading { display: flex; align-items: center; gap: 15px; }
.detail-heading .card-mark { width: 51px; height: 51px; font-size: 1.55rem; }
.detail-heading .eyebrow { color: var(--muted); margin-bottom: 4px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 17px; align-items: start; }
.detail-grid aside { display: grid; gap: 14px; }
.panel { padding: 19px; }
.panel h2 { font-size: 1.17rem; margin-bottom: 10px; line-height: 1.2; letter-spacing: -.03em; }
.panel p { color: var(--muted); font-size: .88rem; margin-bottom: 12px; }
.instructions h2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.instructions h2 code { font-size: .7rem; color: var(--muted); }
.instructions pre { margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); font-size: .86rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.command { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px; border: 1px solid #dce6db; border-radius: 8px; background: #f2f6ee; }
.command code { min-width: 0; padding: 4px; font-size: .82rem; overflow-wrap: anywhere; color: var(--forest); }
.copy { flex-shrink: 0; padding: 4px 7px; border: 1px solid #cbd9cb; border-radius: 5px; background: var(--white); color: var(--forest); font-size: .73rem; font-weight: 650; }
.copy:hover { background: #e8eee2; }
.install-panel p { margin-block: 12px 7px; }
.install-panel a, .cli-next a { font-size: .86rem; color: var(--forest); font-weight: 660; }
.maintainer strong { display: block; color: var(--ink); }
.version-list { list-style: none; padding: 0; margin: 0; }
.version-list li + li { margin-top: 5px; }
.version-list a { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding: 6px 8px; border-radius: 5px; text-decoration: none; font-size: .74rem; }
.version-list a:hover, .version-list a[aria-current] { background: #eaf0e7; color: var(--forest); }
.version-list time { margin-left: auto; color: var(--muted); }
.download-grid, .guide-grid { display: grid; gap: 12px; margin-bottom: 16px; }
.download-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.download { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-decoration: none; }
.download:hover { border-color: #8fac9a; }
.download div span, .download strong { display: block; }
.download div span { color: var(--muted); font-size: .85rem; }
.download > span { color: var(--forest); font-size: 1.25rem; }
.guide-grid { grid-template-columns: 1fr 1fr; }
.cli-next { margin-top: 20px; }
.publish-page, .login-page { max-width: 680px; }
.publish-form, .publish-form label, .login-form, .login-form label { display: grid; gap: 15px; }
.publish-form label, .login-form label { gap: 6px; font-weight: 650; font-size: .9rem; }
.publish-form input, .publish-form select, .login-form input { min-width: 0; width: 100%; padding: 8px 10px; background: #fafbf8; border: 1px solid #c8d3c7; border-radius: 7px; color: var(--ink); font-weight: 400; }
.publish-form small { color: var(--muted); font-weight: 400; }
.publish-form button, .login-form button { justify-self: start; }
.login-form p { margin-bottom: 0; }
.login-options { display: grid; gap: 15px; }
.login-form .button { justify-self: start; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: #842d2d !important; background: #fbefec; border: 1px solid #ebc6be; padding: 9px 12px; border-radius: 7px; }

.guide-heading { margin-block: 28px 12px; font-size: 1.35rem; letter-spacing: -.03em; }
.content-page > .command { max-width: 680px; }
.commands { display: grid; gap: 8px; }
.command pre { min-width: 0; margin: 0; padding: 4px; color: var(--forest); font-size: .82rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.agent-panel .command { margin-bottom: 12px; }
.agent-panel p:last-child { margin-bottom: 0; }
.notice { max-width: 66ch; margin-bottom: 18px; padding: 11px 14px; border: 1px solid #cfdcae; border-radius: 9px; background: #f1f6e2; font-size: .9rem; overflow-wrap: anywhere; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: .9rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.plain-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.data-table { width: 100%; margin-bottom: 14px; border-collapse: collapse; font-size: .88rem; }
.data-table th { color: var(--muted); font-size: .74rem; font-weight: 650; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.data-table th, .data-table td { padding: 7px 12px 7px 0; border-bottom: 1px solid #edf0ea; overflow-wrap: anywhere; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.panel-link { color: var(--forest); font-size: .86rem; font-weight: 660; }
.level { padding: 2px 9px; border-radius: 100px; background: #e0ecd9; color: #2e5a41; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.level-public { background: #e4ebf6; color: #344b72; }
.level-write { background: #f4e7df; color: #714d3d; }

.sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-block: 28px 72px; }
.section-card .eyebrow { color: var(--muted); margin-bottom: 6px; }
.section-links { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.section-links a { color: var(--forest); font-size: .9rem; font-weight: 660; }

@media (max-width: 1200px) {
  .topbar-inner { grid-template-columns: auto minmax(0, 1fr); row-gap: 0; padding-top: 12px; }
  .topbar nav { grid-row: 2; grid-column: 1 / -1; flex-wrap: wrap; justify-content: flex-start; }
  .topbar nav a { padding-block: 14px; }
}

@media (max-width: 770px) {
  .shell { width: min(1112px, calc(100% - 36px)); }
  .hero { margin-top: 25px; }
  .hero-body { min-height: 300px; padding: 30px; gap: 23px; }
  .skill-grid, .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid, .account-grid { grid-template-columns: 1fr; }
  .detail-grid aside { order: -1; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

@media (max-width: 520px) {
  .shell { width: calc(100% - 28px); }
  .topbar-inner { grid-template-columns: auto minmax(0, 1fr); min-height: 0; column-gap: 8px; row-gap: 0; padding-top: 10px; }
  .topbar nav { grid-row: 2; grid-column: 1 / -1; }
  .topbar nav a { padding-block: 11px; }
  .publish-button { grid-column: 2; grid-row: 1; padding-inline: 9px; }
  .hero-body { grid-template-columns: 1fr; padding: 24px 23px 27px; }
  .hero h1 { font-size: clamp(2.8rem, 12vw, 4.15rem); }
  .terminal { margin-right: 8px; }
  .terminal-body { min-height: 0; padding-block: 13px; }
  .catalog { padding-block: 36px 49px; }
  .skill-grid, .guide-grid, .detail-grid aside, .sections { grid-template-columns: 1fr; }
  .nav-group + .nav-group::before { display: none; }
  .download { padding: 13px; }
  .search { gap: 7px; }
  .search input { font-size: .82rem; }
  .search-icon { margin-left: 5px; }
  .content-page { padding-block: 24px 46px; }
  .detail-heading { gap: 10px; }
}

/* The sign-in page: one full stage in the brand green, with the lockup as its headline. */
.stage-body { background: var(--forest); }
.stage-body main { display: flex; }
.login-stage { flex: 1; min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; gap: 28px; padding: clamp(24px, 6vw, 88px); color: var(--white); background-color: var(--forest); background-image: radial-gradient(88rem 50rem at 6% 114%, #d7ec9d30, transparent 60%), linear-gradient(180deg, var(--forest-deep), #102b2300 42%), repeating-linear-gradient(90deg, #ffffff0d 0 1px, transparent 1px 44px), repeating-linear-gradient(0deg, #ffffff0d 0 1px, transparent 1px 44px); }
.login-stage-inner { align-self: center; width: min(1112px, 100%); margin-inline: auto; display: grid; justify-items: start; gap: clamp(20px, 3.2vw, 36px); }
.lockup-hero { font-size: clamp(1.7rem, 8.4vw, 6.3rem); }
.lockup-hero .lockup-suffix { color: var(--lime); }
.lockup-cursor { align-self: baseline; display: inline-block; width: .4em; height: 1em; margin-left: -.2em; background: var(--lime); }
.login-pitch { max-width: 31ch; color: #dae7dd; font-size: clamp(1.08rem, 2.1vw, 1.55rem); line-height: 1.3; letter-spacing: -.012em; }
.login-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.button-google { padding: 13px 22px 13px 16px; border-radius: 999px; background: var(--white); color: #1f2a24; font-size: 1rem; gap: .7rem; box-shadow: 0 0 0 0 #d7ec9d00; transition: box-shadow .18s ease-out; }
.button-google:hover { box-shadow: 0 0 0 6px #d7ec9d4d; }
.button-google svg { flex: none; width: 20px; height: 20px; }
.login-note { color: #a9c0b3; font-size: .92rem; }
.login-foot { width: min(1112px, 100%); margin-inline: auto; color: #86a394; font-size: .82rem; }
.login-stage :focus-visible { outline-color: var(--lime); }
.login-stage .form-error { max-width: 52ch; color: #ffe1db !important; background: #6d24244d; border-color: #ff9d8e73; }
.login-stage .login-form { width: min(430px, 100%); padding: 18px; border: 1px solid #ffffff26; border-radius: var(--round); background: #ffffff0a; }
.login-stage .login-form p { color: #a9c0b3; font-size: .88rem; }
.login-stage .login-form input { background: #0d241d; border-color: #ffffff33; color: var(--white); }
.login-stage .login-form input::placeholder { color: #86a394; }
.login-stage .button-outline { border-color: #ffffff59; color: var(--white); }
.login-stage .button-outline:hover { background: #ffffff14; }

/* One sequence when the page loads: the letters land, then /ia is typed and the cursor stays. */
@media (prefers-reduced-motion: no-preference) {
  .lockup-hero .wordmark-letter { opacity: 0; transform: translateY(5px); animation: letter-in .55s cubic-bezier(.2, .8, .2, 1) forwards; }
  .lockup-hero .wordmark-letter:nth-child(2) { animation-delay: .06s; }
  .lockup-hero .wordmark-letter:nth-child(3) { animation-delay: .12s; }
  .lockup-hero .wordmark-letter:nth-child(4) { animation-delay: .18s; }
  .lockup-hero .wordmark-letter:nth-child(5) { animation-delay: .24s; }
  .lockup-hero .wordmark-letter:nth-child(6) { animation-delay: .30s; }
  .lockup-hero .wordmark-letter:nth-child(7) { animation-delay: .36s; }
  .lockup-hero .lockup-suffix { overflow: hidden; width: 0; animation: type-in .42s steps(3, end) .95s forwards; }
  .lockup-cursor { animation: cursor-blink 1.1s steps(1, end) 1.4s infinite; }
  .login-pitch, .login-actions, .login-stage .form-error, .login-stage .login-form, .login-foot { opacity: 0; animation: settle .5s ease-out 1.25s forwards; }
}
@keyframes letter-in { to { opacity: 1; transform: none; } }
@keyframes type-in { to { width: 3ch; } }
@keyframes cursor-blink { 50% { opacity: 0; } }
@keyframes settle { to { opacity: 1; } }

/* The tools page: a bar to search with, a rail of areas and, in each area, its tools grouped by resource. */
.tools-page .lede { max-width: 74ch; margin-bottom: 18px; }
.tools-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-inline: -10px; padding: 10px; border-bottom: 1px solid var(--line); background: var(--paper); }
.tools-bar .search { flex: 1 1 320px; }
.tools-bar .search:focus-within { border-color: #92ae9d; }
.tools-bar .search input:focus-visible { outline: 0; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.segmented button { padding: 7px 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: .84rem; font-weight: 650; }
.segmented button:hover { background: #eef1e8; color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--forest); color: var(--white); }
.tools-status { min-width: 15ch; color: var(--muted); font-size: .84rem; text-align: right; }
.tools-layout { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: 44px; align-items: start; margin-top: 28px; }
.tools-layout-single { grid-template-columns: minmax(0, 1fr); }
.tools-rail { position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow-y: auto; }
.tools-rail ol { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.tools-rail a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 10px 7px 12px; border-left: 2px solid var(--line); color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; }
.tools-rail a:hover { border-left-color: #92ae9d; color: var(--ink); }
.tools-rail a[aria-current] { border-left-color: var(--forest); color: var(--forest); }
.tools-rail a[data-empty] { opacity: .4; }
.tools-rail a:focus-visible { outline-offset: -3px; }
.rail-count { color: #6d7d73; font: 500 .76rem var(--mono); }
.area { scroll-margin-top: 82px; }
.area + .area { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--line); }
.tools-areas .area[data-first] { margin-top: 0; padding-top: 0; border-top: 0; }
.area-head h2 { font-size: clamp(1.55rem, 2.7vw, 2.05rem); letter-spacing: -.045em; line-height: 1.1; }
.area-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 9px; color: var(--muted); font-size: .84rem; }
.area-meta code { padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--forest); font-size: .76rem; }
.area-text { max-width: 66ch; margin-top: 10px; color: #33443b; }
.tool-group { margin-top: 24px; }
.tool-group h3 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; font-size: .98rem; letter-spacing: -.012em; }
.tool-group h3 span { color: #6d7d73; font: 500 .76rem var(--mono); }
.tool-rows { margin: 0; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--line); border-radius: var(--round); background: var(--white); }
.tool { scroll-margin-top: 92px; }
.tool + .tool { border-top: 1px solid #edf0ea; }
.tool:target { box-shadow: inset 3px 0 var(--forest); }
.tool summary, .tool-row { position: relative; display: grid; gap: 3px; padding: 11px 46px 12px 17px; }
.tool summary { cursor: pointer; list-style: none; }
.tool summary::-webkit-details-marker { display: none; }
.tool summary::after { content: ''; position: absolute; top: 16px; right: 20px; width: 7px; height: 7px; border-right: 1.7px solid #6d8577; border-bottom: 1.7px solid #6d8577; transform: rotate(45deg); }
.tool details[open] summary::after { top: 20px; transform: rotate(225deg); }
.tool summary:hover { background: #f8faf5; }
.tool summary:focus-visible { outline-offset: -3px; border-radius: 6px; }
.tool-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tool-name code { color: var(--ink); font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
.tool-summary { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
/* Closed, a tool takes two lines at most, so a long area can be scanned; opening it shows everything. */
.tool summary .tool-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.tool details[open] .tool-summary { display: block; color: var(--ink); }
.tool-rest { max-width: 78ch; padding: 0 46px 15px 17px; color: #33443b; font-size: .9rem; overflow-wrap: anywhere; }
.tools-empty { padding: 30px 0; color: var(--muted); }
.tools-foot { max-width: 80ch; margin-top: 38px; color: var(--muted); font-size: .84rem; }

@media (max-width: 900px) {
  .tools-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 18px; }
  .tools-rail { position: static; max-height: none; overflow: visible; }
  .tools-rail ol { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
  .tools-rail a { gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 100px; background: var(--white); white-space: nowrap; }
  .tools-rail a[aria-current] { border-color: var(--forest); }
  .area { scroll-margin-top: 120px; }
  .tool { scroll-margin-top: 130px; }
}

@media (max-width: 520px) {
  .tools-bar { position: static; margin-inline: -6px; padding: 8px 6px; }
  .area { scroll-margin-top: 16px; }
  .tool { scroll-margin-top: 16px; }
  .tools-status { flex-basis: 100%; min-width: 0; text-align: left; }
  .segmented { flex: 1 1 auto; }
  .segmented button { flex: 1; padding-inline: 8px; }
  .area + .area { margin-top: 36px; padding-top: 28px; }
  .tool summary, .tool-row { padding: 10px 40px 11px 13px; }
  .tool summary::after { right: 16px; }
  .tool-rest { padding: 0 40px 13px 13px; }
}

@media (prefers-reduced-motion: no-preference) {
  .tool summary::after { transition: transform .15s ease-out, top .15s ease-out; }
}

/* The administration section: lists of people and roles, small forms beside them, and the form where tools are ticked. */
.admin-page { --clay: #9b4f33; --clay-soft: #fbf1eb; --tick: #f3f8e8; }
.admin-tabs { display: flex; gap: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.admin-tabs a { padding: 9px 0 11px; color: var(--muted); font-size: .92rem; font-weight: 650; text-decoration: none; }
.admin-tabs a:hover { color: var(--ink); }
.admin-tabs a[aria-current] { color: var(--forest); box-shadow: inset 0 -2px var(--forest); }
.admin-section { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 30px; align-items: start; }
.admin-section + .admin-section { margin-top: 46px; padding-top: 38px; border-top: 1px solid var(--line); }
.admin-list h2, .admin-heading { font-size: clamp(1.5rem, 2.5vw, 1.9rem); letter-spacing: -.045em; line-height: 1.1; }
.admin-heading { margin-top: 46px; padding-top: 36px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.count { margin-left: 4px; color: #6d7d73; font: 500 .9rem var(--mono); letter-spacing: 0; }
.admin-lead { max-width: 72ch; margin-top: 9px; color: var(--muted); font-size: .92rem; }
.admin-note { max-width: 72ch; margin-top: 14px; color: var(--muted); font-size: .84rem; }
.admin-note code, .admin-form small code { color: var(--forest); font-size: .78rem; overflow-wrap: anywhere; }
.admin-empty { margin-top: 16px; padding: 22px; border: 1px dashed #c5cfc0; border-radius: var(--round); color: var(--muted); font-size: .92rem; }
.admin-rows { margin: 16px 0 0; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--line); border-radius: var(--round); background: var(--white); }
.admin-rows li + li { border-top: 1px solid #edf0ea; }
.admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; padding: 12px 17px; text-decoration: none; }
.admin-row:hover { background: #f8faf5; }
.admin-row:focus-visible { outline-offset: -3px; border-radius: 10px; }
.row-name { display: grid; gap: 1px; min-width: 0; }
.row-name strong { font-size: .98rem; font-weight: 650; letter-spacing: -.012em; overflow-wrap: anywhere; }
.row-id { color: var(--muted); font: .78rem var(--mono); overflow-wrap: anywhere; }
.row-facts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 12px; color: var(--muted); font-size: .84rem; text-align: right; }
.row-roles { max-width: 30ch; overflow-wrap: anywhere; }
.row-tools { min-width: 15ch; color: var(--ink); font-weight: 600; }
.admin-row-off .row-name strong, .admin-row-off .row-tools { color: var(--muted); }
.tag { padding: 2px 9px; border: 1px solid #cfd8cb; border-radius: 100px; color: #3f5247; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.tag-on { border-color: transparent; background: #e0ecd9; color: #2e5a41; }
.tag-off { border-color: transparent; background: #e9e8e2; color: #5b584e; }
.admin-side { display: grid; gap: 14px; }
.admin-form, .admin-form label { display: grid; gap: 12px; }
.admin-form h3 { font-size: 1.05rem; letter-spacing: -.02em; }
.admin-form label { gap: 6px; font-size: .88rem; font-weight: 650; }
.admin-form input { min-width: 0; width: 100%; padding: 8px 10px; border: 1px solid #c8d3c7; border-radius: 7px; background: #fafbf8; color: var(--ink); font-weight: 400; }
.admin-form small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.admin-form p { margin-bottom: 0; }
.admin-form .button { justify-self: start; }
.admin-page .form-error { max-width: 80ch; margin-bottom: 18px; font-size: .9rem; overflow-wrap: anywhere; }
.admin-form .form-error { margin-bottom: 0; }
.button-danger { border-color: #dbb8a8; background: transparent; color: #8a3a22; }
.button-danger:hover { background: #fbefec; }
.button:disabled { opacity: .45; cursor: default; }

/* One account or one role: what it can do right now, said first. */
.subject-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; }
.subject-id { margin-right: 4px; color: var(--muted); font: .92rem var(--mono); overflow-wrap: anywhere; }
.now { max-width: 74ch; margin-block: 22px 26px; padding-left: 16px; border-left: 3px solid var(--forest); color: #33443b; font-size: 1.06rem; line-height: 1.45; }
.now strong { color: var(--ink); font-weight: 700; }
.now-off { border-left-color: #b9b6a8; }
.result { max-width: 80ch; margin-bottom: 20px; padding: 13px 16px; border: 1px solid #cfdcae; border-left: 4px solid var(--forest); border-radius: 9px; background: #f1f6e2; }
.result-text { font-weight: 650; }
.result-list { margin-top: 6px; font-size: .9rem; overflow-wrap: anywhere; }
.result-list code { font-size: .84rem; }
.result-plain code { font: inherit; }
.admin-page .result-shop { color: var(--clay); }
.admin-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.admin-panels .panel p { max-width: 62ch; }
.admin-panels .panel p strong { color: var(--ink); }
.admin-panels .admin-note { margin-top: 14px; margin-bottom: 0; font-size: .84rem; }
.checklist { display: grid; gap: 2px; margin: 0 0 14px; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.checklist label { flex: 1; display: flex; align-items: flex-start; gap: 11px; min-width: 0; margin-inline: -8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.checklist label:hover { background: #f4f6ef; }
.checklist input, .pick-main input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--forest); }
.checklist label > span { display: grid; min-width: 0; }
.checklist strong { font-size: .92rem; font-weight: 650; overflow-wrap: anywhere; }
.checklist small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.checklist a { color: var(--forest); font-size: .8rem; font-weight: 650; }
.checklist-columns { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2px 26px; margin-top: 16px; padding: 10px 18px; border: 1px solid var(--line); border-radius: var(--round); background: var(--white); }

/* The form of tools. It borrows the bar, the rail and the areas of the tools page, and puts a box on every tool. */
.picker-legend { max-width: 80ch; margin-block: 14px 16px; color: #33443b; font-size: .9rem; }
.level-read { padding-inline: 0; background: none; color: #647a6d; font-weight: 650; }
.admin-page .level-write { background: var(--clay); color: var(--white); }
.toggle { padding: 9px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); color: var(--muted); font-size: .84rem; font-weight: 650; }
.toggle:hover { background: #eef1e8; color: var(--ink); }
.toggle[aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: var(--white); }
.rail-count b { color: var(--ink); font-weight: 700; }
.area-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; }
.area-picked { color: var(--muted); font-size: .88rem; }
.area-picked strong { color: var(--ink); }
.area-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.area-actions button { padding: 5px 11px; border: 1px solid #c8d3c7; border-radius: 100px; background: var(--white); color: var(--forest); font-size: .8rem; font-weight: 650; }
.area-actions button:hover { background: #e9eee4; }
.pick { position: relative; display: flow-root; scroll-margin-top: 92px; }
.pick + .pick { border-top: 1px solid #edf0ea; }
.pick:target { outline: 2px solid var(--forest); outline-offset: -2px; }
.pick-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 13px; align-items: start; padding: 11px 17px 12px; cursor: pointer; }
.pick-main:hover { background: #f8faf5; }
.pick-text { display: grid; gap: 3px; min-width: 0; }
.pick:has(.pick-more) .pick-main { padding-right: 104px; }
.pick:not(.pick-locked):has(input:checked) { background: var(--tick); }
.pick:has(input:checked) .pick-main:hover { background: none; }
/* What changes the real shop is never just one more row: a bar on its edge, and a warmer ground once it is ticked. */
.pick[data-level="write"] { box-shadow: inset 3px 0 #e2c4b4; }
.pick[data-level="write"]:not(.pick-locked):has(input:checked) { background: var(--clay-soft); box-shadow: inset 3px 0 var(--clay); }
/* A tool the account has through a role: on, but not here to change. */
.pick-locked { background: var(--paper); }
.pick-locked .pick-main { cursor: default; }
.pick-boxless { grid-template-columns: minmax(0, 1fr); padding-left: 48px; }
.pick-locked .pick-main:hover { background: none; }
.pick-locked .tool-name code { color: #3f5247; }
.pick-note { margin: -5px 17px 12px 48px; color: var(--muted); font-size: .82rem; }
.pick-note a { color: var(--forest); font-weight: 650; }
/* The rest of a description opens from the corner of its row, as on the tools page. */
.pick-more summary { position: absolute; top: 8px; right: 12px; display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 6px; color: var(--muted); font-size: .8rem; font-weight: 650; cursor: pointer; list-style: none; }
.pick-more summary::-webkit-details-marker { display: none; }
.pick-more summary::after { content: ''; width: 6px; height: 6px; margin-top: -3px; border-right: 1.7px solid #6d8577; border-bottom: 1.7px solid #6d8577; transform: rotate(45deg); }
.pick-more[open] summary::after { margin-top: 3px; transform: rotate(225deg); }
.pick-more summary:hover { color: var(--ink); }
.pick-more .tool-rest { max-width: 78ch; margin: -4px 17px 13px 48px; padding: 0; color: #33443b; font-size: .88rem; }
.pick[data-change] .tool-name::after { padding: 2px 9px; border-radius: 100px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.pick[data-change="add"] .tool-name::after { content: "Se aprueba al guardar"; background: var(--forest); color: var(--white); }
.pick[data-change="remove"] .tool-name::after { content: "Se retira al guardar"; background: #e9e8e2; color: #3d3b34; }
.picker-missing { margin-top: 46px; padding-top: 30px; border-top: 1px solid var(--line); }
.picker-missing h3 { font-size: 1.15rem; letter-spacing: -.02em; }
.picker-missing p { max-width: 80ch; margin-block: 8px 14px; color: var(--muted); font-size: .9rem; }
.save-bar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 30px -10px 0; padding: 12px 10px; border-top: 1px solid var(--line); background: var(--paper); }
.save-count { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.save-count strong { color: var(--ink); font-size: 1.05rem; }
.save-pending { flex: 1 1 200px; min-width: 0; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.save-pending[data-changed] { color: var(--ink); }
.save-pending code { font-size: .8rem; }
.save-shop { color: var(--clay); }
.save-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }

/* The log: one line per call or change. */
.admin-page .filters { margin-block: 0 18px; }
.log { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--round); background: var(--white); font-size: .88rem; }
.log th { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .78rem; font-weight: 650; text-align: left; }
.log td { padding: 9px 14px; border-top: 1px solid #edf0ea; vertical-align: top; overflow-wrap: anywhere; }
.log tbody tr:first-child td { border-top: 0; }
.log small { display: block; color: var(--muted); font-size: .8rem; }
.log-when { color: var(--muted); font: .8rem var(--mono); white-space: nowrap; }
.log-what code { font-size: .84rem; font-weight: 600; }
.log-change .log-what { box-shadow: inset 3px 0 var(--forest); }
.outcome { font-weight: 650; }
.outcome-denied { color: #7a5a12; }
.outcome-error { color: #842d2d; }

@media (max-width: 900px) {
  .admin-section { grid-template-columns: minmax(0, 1fr); }
  .admin-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .pick { scroll-margin-top: 130px; }
}

@media (max-width: 770px) {
  .admin-panels, .admin-side { grid-template-columns: minmax(0, 1fr); }
  .log thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .log, .log tbody, .log tr, .log td { display: block; }
  .log tr { padding: 10px 14px; border-top: 1px solid #edf0ea; }
  .log tbody tr:first-child { border-top: 0; }
  .log td { padding: 1px 0; border: 0; }
  .log small { display: inline; }
  .log-change .log-what { padding-left: 10px; }
}

@media (max-width: 520px) {
  .admin-tabs { gap: 20px; margin-bottom: 24px; }
  .admin-row { grid-template-columns: minmax(0, 1fr); padding: 11px 13px; }
  .row-facts { justify-content: flex-start; text-align: left; }
  .row-tools { min-width: 0; }
  .now { font-size: 1rem; }
  .pick { scroll-margin-top: 16px; }
  .pick-main, .pick:has(.pick-more) .pick-main { gap: 0 11px; padding: 10px 13px 11px; }
  .pick-note { margin: -4px 13px 11px 42px; }
  .pick-more summary { position: static; display: inline-flex; margin: -5px 0 9px 36px; }
  .pick-more .tool-rest { margin: -2px 13px 12px 42px; }
  .checklist-columns { padding: 8px 14px; }
  .save-bar { margin-inline: -6px; padding: 10px 6px; }
  .save-pending { flex-basis: 100%; }
  .save-pending:not([data-changed]) { display: none; }
  .save-actions { width: 100%; margin-left: 0; }
  .save-actions .button { flex: 1; }
}
