
/* directlang built-in stylesheet: civic design, high contrast, readable */
:root{--ink:#1b1b1b;--ink-2:#565c65;--paper:#fff;--paper-2:#f0f0f0;--line:#a9aeb1;--line-2:#dfe1e2;
--primary:#005ea2;--primary-dark:#1a4480;--primary-darker:#162e51;--focus:#2491ff;
--error:#b50909;--error-bg:#f4e3db;--ok:#00a91c;--ok-bg:#ecf3ec;--info-bg:#e7f6f8;--warn-bg:#faf3d1;
/* code: the paper it sits on, and one color per kind of word. Change a line
   here and the code view, the _code part, and the playground all follow. */
--code-paper:#fbfcfd;--code-gutter:#f2f5f7;--code-line:#e3e8ec;
--code-comment:#5f6670;--code-keyword:#8a2c8f;--code-verb:#0b57a4;--code-key:#8a5300;
--code-string:#1d6b2f;--code-literal:#9a3b00;--code-value:#006b75;--code-template:#b3261e;
--code-html:#44525f;--code-attr:#5f6670;--code-fn:#3949ab}
*{box-sizing:border-box}
html{font-size:17px}
body{margin:0;font-family:"Public Sans","Source Sans Pro",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;line-height:1.55;color:var(--ink);background:var(--paper)}
main,.dl-main{max-width:72rem;margin:0 auto;padding:0 1.25rem 4rem}
a{color:var(--primary);text-decoration:underline;text-underline-offset:.15em}a:hover{color:var(--primary-darker)}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:.25rem solid var(--focus);outline-offset:0}
.skip{position:absolute;left:-999px;top:0;background:var(--paper);padding:.5rem 1rem;z-index:10}.skip:focus{left:0}
h1{font-size:2rem;line-height:1.2;margin:1.6rem 0 .8rem;font-weight:700}
h2{font-size:1.4rem;line-height:1.25;margin:2rem 0 .6rem;font-weight:700}
h3{font-size:1.15rem;margin:1.4rem 0 .4rem}
p{margin:.6rem 0 1rem;max-width:68ch}
.muted{color:var(--ink-2)}
/* banner and navigation */
.dl-banner{background:var(--primary-darker);color:#fff}
.dl-nav{max-width:72rem;margin:0 auto;padding:.6rem 1.25rem;display:flex;flex-wrap:wrap;gap:.4rem 2rem;align-items:baseline}
.dl-nav a{color:#fff;text-decoration:none;padding:.25rem .1rem;border-bottom:2px solid transparent}
.dl-nav a:hover,.dl-nav a:focus-visible{border-bottom-color:#fff}.dl-nav a.on{border-bottom-color:#fff;font-weight:700}
.dl-nav .dl-brand a{font-weight:700;font-size:1.1rem;letter-spacing:.01em}
.dl-nav .dl-group{display:flex;flex-wrap:wrap;gap:.2rem .9rem;align-items:baseline}
.dl-nav .dl-tools{margin-left:auto}
.dl-bar{background:var(--paper-2);border-bottom:1px solid var(--line-2)}
.dl-subnav{max-width:72rem;margin:0 auto;padding:.45rem 1.25rem;display:flex;flex-wrap:wrap;gap:.3rem 2rem;align-items:baseline;font-size:.95rem}
.dl-subnav .dl-group{display:flex;flex-wrap:wrap;gap:.15rem .85rem;align-items:baseline}
.dl-subnav a{text-decoration:none;padding:.15rem .05rem;border-bottom:2px solid transparent}
.dl-subnav a:hover,.dl-subnav a:focus-visible{border-bottom-color:var(--primary)}.dl-subnav a.on{border-bottom-color:var(--primary);color:var(--ink);font-weight:700}
.dl-label{color:var(--ink-2);font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.dl-page-tools{margin-left:auto}
.dl-scroll{overflow-x:auto;max-width:100%}
.negative{color:var(--error)}
.dl-hidden{position:absolute;left:0;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap} /* left:0, so a label at the end of a wide table never widens the page */
.dl-actions a{margin-right:.6rem;font-size:.92rem;white-space:nowrap}
/* a table, the bar of its actions above it, and its pages below */
.dl-table-box{width:fit-content;max-width:100%;margin:1rem 0 1.5rem}.dl-table-box table{margin:0}
pre.dl-code{margin:.6rem 0 1rem}code.dl-code{background:none;padding:0}
.dl-table-bar{display:flow-root;background:var(--paper-2);border-radius:.25rem .25rem 0 0;padding:.4rem .8rem;font-size:.9rem}
.dl-table-menu{float:right;position:relative;margin-left:1.5rem}.dl-table-menu summary{list-style:none;cursor:pointer;padding:0 .5rem;border-radius:.25rem;font-size:1.15rem;line-height:1.4;font-weight:700;color:var(--ink-2)}.dl-table-menu summary::-webkit-details-marker{display:none}.dl-table-menu summary:hover,.dl-table-menu summary:focus-visible,.dl-table-menu[open] summary{background:var(--paper);color:var(--ink)}
.dl-table-menu-items{position:absolute;right:0;top:calc(100% + .3rem);z-index:10;min-width:11rem;background:var(--paper);border:1px solid var(--line);border-radius:.3rem;box-shadow:0 .4rem 1rem rgba(0,0,0,.12);padding:.3rem 0}.dl-table-menu-items a{display:block;padding:.4rem .9rem;text-decoration:none;white-space:nowrap}.dl-table-menu-items a:hover,.dl-table-menu-items a:focus-visible{background:var(--paper-2)}
.dl-table-bar .dl-filter{margin:0}.dl-table-bar .dl-filter-form{width:0;min-width:100%;background:var(--paper)}
.dl-download{white-space:nowrap}
.dl-group th{text-align:left;background:var(--paper-2);font-weight:700;padding-top:.7rem}.dl-subtotal td,.dl-subtotal th{font-weight:600;border-top:1px solid var(--line)}.dl-tabs{display:flex;flex-wrap:wrap;gap:.25rem 1rem;margin:.5rem 0 1rem;border-bottom:1px solid var(--line-2)}.dl-tabs a{padding:.35rem .1rem;text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px}.dl-tabs a:hover,.dl-tabs a:focus-visible{border-bottom-color:var(--line)}.dl-tabs a[aria-current]{border-bottom-color:var(--primary);color:var(--ink);font-weight:700}.dl-table-foot{display:flex;flex-wrap:wrap;gap:.5rem 1rem;align-items:center;justify-content:space-between;font-size:.92rem;color:var(--ink-2);margin:.4rem 0 0}.dl-page-links{display:inline-flex;flex-wrap:wrap;gap:.25rem;align-items:center}.dl-page-links a,.dl-page-links span{min-width:2rem;padding:.15rem .5rem;text-align:center;border-radius:.25rem}.dl-page-links a{border:1px solid var(--line);text-decoration:none}.dl-page-links a:hover,.dl-page-links a:focus-visible{border-color:var(--primary)}.dl-page-links [aria-current]{font-weight:700;background:var(--paper-2);color:var(--ink)}.dl-page-off{opacity:.4}
.dl-filter{margin:.5rem 0 .75rem}.dl-filter summary{cursor:pointer;color:var(--primary);font-size:.95rem}
.dl-filter-form{display:flex;flex-wrap:wrap;gap:.5rem 1.5rem;align-items:flex-end;background:var(--paper-2);border:1px solid var(--line-2);padding:.75rem 1rem;margin-top:.5rem;border-radius:.25rem}
.dl-filter-form label,.dl-filter-form legend{font-weight:600;font-size:.9rem;margin:0 0 .2rem}
.dl-filter-form fieldset{border:0;padding:0;margin:0}.dl-filter-bar .dl-filter-form{margin-top:0}.dl-filter-count{font-size:.85rem;color:var(--ink-2);margin:0 0 .3rem}.dl-filter-form input[type=search],.dl-filter-form input[type=text],.dl-filter-form input[type=date],.dl-filter-form select{min-height:2.2rem;padding:.3rem .5rem}
.dl-filter-form .toolbar{margin:0}.dl-check,.dl-inline{display:inline-flex;gap:.3rem;align-items:center;font-weight:400;margin-right:.6rem}
.dl-grid td a{color:inherit;text-decoration-color:var(--line)}
.dl-record-actions{margin-top:-.75rem}.dl-help{margin:.1rem 0 .35rem}
.dl-main table{display:block;overflow-x:auto}.dl-main .dl-scroll table{display:table}
.dl-nav .dl-group>span{color:#c9d3e6;font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;margin-right:.2rem}
/* tables */
table{border-collapse:collapse;margin:1rem 0 1.5rem;width:auto;max-width:100%;font-size:.97rem}
caption{text-align:left;font-weight:700;padding:.4rem 0}
th,td{text-align:left;padding:.5rem .8rem;border-bottom:1px solid var(--line-2);vertical-align:top}
thead th,tr:first-child th[scope=col]{background:var(--paper-2);border-bottom:2px solid var(--line);font-weight:700}
th[scope=row]{font-weight:600;background:var(--paper-2)}
tbody tr:hover td{background:#f9f9f9}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
.pill{display:inline-block;font-size:.8rem;background:var(--line-2);padding:.05rem .55rem;border-radius:1rem;color:var(--ink)}
/* a function's name in the documents links to its page, quietly inside code */
.doc pre a{text-decoration:none;border-bottom:1px dotted var(--line)}
.doc pre a:hover{border-bottom-color:currentColor}
/* code and alerts */
pre,code,.CodeMirror{font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;font-size:.92rem}
pre{background:var(--code-paper);border:1px solid var(--code-line);padding:.9rem 1.1rem;overflow:auto;border-radius:.3rem;line-height:1.55;tab-size:2}
code{background:var(--paper-2);padding:.05em .3em;border-radius:.2rem;overflow-wrap:anywhere}pre code{background:none;padding:0}
.alert{border-left:.5rem solid var(--line);background:var(--paper-2);padding:.9rem 1.2rem;margin:1rem 0;max-width:none}
.alert-error{border-left-color:var(--error);background:var(--error-bg)}
.alert-info{border-left-color:#00bde3;background:var(--info-bg)}
.alert-ok{border-left-color:var(--ok);background:var(--ok-bg)}
.alert h2,.alert h3{margin:.1rem 0 .4rem;font-size:1.05rem}.alert pre{background:rgba(255,255,255,.7);margin:.5rem 0 0}
/* forms */
label{display:block;font-weight:600;margin:.8rem 0 .25rem}
input[type=text],input[type=password],input[type=email],input[type=date],select,textarea{font:inherit;padding:.5rem .6rem;border:1px solid var(--ink-2);border-radius:.2rem;background:#fff;min-height:2.6rem}
textarea{width:100%;font-family:ui-monospace,Menlo,monospace;font-size:.92rem;min-height:22rem}
button,.button{font:inherit;font-weight:700;background:var(--primary);color:#fff;border:0;border-radius:.25rem;padding:.65rem 1.25rem;min-height:2.75rem;cursor:pointer}
button:hover,.button:hover{background:var(--primary-dark)}
.hint{color:var(--ink-2);font-size:.9rem}
/* function reference */
.dl-reference{display:grid;grid-template-columns:13rem minmax(0,1fr);gap:2.5rem;align-items:start}
@media(max-width:48rem){.dl-reference{grid-template-columns:1fr}}
.dl-reference>*{min-width:0}.dl-reference table{display:block;overflow-x:auto;max-width:100%}
.dl-reference-index{font-size:.95rem;padding-top:1.6rem}
.dl-reference-index h2{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-2);margin:1.2rem 0 .3rem}
.dl-reference-index ul{list-style:none;margin:0;padding:0}
.dl-reference-index li a{display:block;padding:.1rem .5rem;text-decoration:none;font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;font-size:.88rem;border-left:3px solid transparent}
.dl-reference-index li a:hover{background:var(--paper-2)}
.dl-reference-index li a[aria-current]{border-left-color:var(--primary);font-weight:700;color:var(--ink);background:var(--paper-2)}
.dl-reference-index label{margin-top:0}.dl-reference-index input[type=text]{width:100%;min-height:2.2rem;padding:.3rem .5rem}
.dl-syntax,.dl-reference td code,.dl-reference td a{white-space:pre}
.dl-syntax code{white-space:pre}
.dl-reference h1 code{font-size:inherit;background:none;padding:0}
/* playground */
.play{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.5rem;align-items:start}
@media(max-width:64rem){.play{grid-template-columns:1fr}}
.play .CodeMirror{height:30rem;border:1px solid var(--ink-2);border-radius:.2rem;line-height:1.45}
.play .CodeMirror-focused{outline:.25rem solid var(--focus)}
.result-frame{width:100%;min-height:30rem;border:1px solid var(--ink-2);border-radius:.2rem;background:#fff}
.toolbar{display:flex;flex-wrap:wrap;gap:.75rem 1.25rem;align-items:end;margin:.75rem 0}
.toolbar label{margin:0 0 .25rem}
.record-form{max-width:40rem}.record-form label{margin-top:1rem}.record-form input[type=text],.record-form input[type=password],.record-form input[type=email],.record-form select,.record-form input[type=date]{width:100%;max-width:28rem}
.field-error{border-left:.25rem solid var(--error);padding-left:1rem;margin-top:1rem}.record-form .field-error label{margin-top:0;padding-top:.25rem}
.field-error-message{color:var(--error);font-weight:700;margin:.1rem 0 .4rem}
.field-error input[type=text],.field-error input[type=date],.field-error select{border:.2rem solid var(--error)}
/* code view */
.code{margin-top:3rem;border-top:2px solid var(--line-2);padding-top:.5rem}
.code h3{font-size:1rem;margin:1.4rem 0 .4rem}.code details{margin:1rem 0}.code summary{cursor:pointer;color:var(--primary)}
.code-listing{padding:.5rem 0;font-size:.88rem;line-height:1.55}.code-listing code{background:none;padding:0}
.code-line{display:block;padding:0 1.1rem 0 0}.code-line:target{background:var(--warn-bg)}
/* the line numbers make a gutter down the left of a listing */
.code-listing .code-ln{background:var(--code-gutter);border-right:1px solid var(--code-line)}
.code-line:hover .code-ln{color:var(--primary)}
.code-line.code-error{background:var(--error-bg);box-shadow:inset .3rem 0 0 var(--error)}
.code-ln{display:inline-block;min-width:3.2rem;padding-right:1rem;text-align:right;color:var(--ink-2);text-decoration:none;user-select:none}
/* directlang code colors, shared by the code view, the _code part, and the playground (cm-) */
.dl-comment,.cm-dl-comment{color:var(--code-comment);font-style:italic}
.dl-keyword,.cm-dl-keyword{color:var(--code-keyword);font-weight:600}
.dl-verb,.cm-dl-verb{color:var(--code-verb)}
.dl-fn,.cm-dl-fn{color:var(--code-fn);text-decoration:underline dotted;text-underline-offset:.2em}
.dl-pipe,.cm-dl-pipe{color:var(--code-verb);font-weight:700}
.dl-key,.cm-dl-key{color:var(--code-key)}
.dl-string,.cm-dl-string{color:var(--code-string)}
.dl-literal,.cm-dl-literal{color:var(--code-literal)}
.dl-value,.cm-dl-value{color:var(--code-value)}
.dl-template,.cm-dl-template{color:var(--code-template);font-weight:700}
.dl-html,.cm-dl-html{color:var(--code-html)}
.dl-attr,.cm-dl-attr{color:var(--code-attr)}
/* data flow */
.flow{margin-top:3rem;border-top:2px solid var(--line-2);padding-top:.5rem}
.flow-group h3{font-weight:500;font-size:1rem;margin:1.4rem 0 .4rem}.flow-group h3 code{font-size:.95rem}
.steps{list-style:none;padding:0;margin:0 0 0 .5rem;border-left:3px solid var(--line-2)}
.steps li{padding:.35rem 0 .35rem 1rem;position:relative}
.steps li::before{content:"";position:absolute;left:-.55rem;top:.95rem;width:.8rem;height:.8rem;border-radius:50%;background:var(--primary);border:2px solid #fff}
.flow-sum{font-weight:700;margin-left:.4rem}
.steps details{margin:.3rem 0 0}.steps summary{cursor:pointer;color:var(--primary);font-size:.9rem}
.steps table{font-size:.88rem;margin:.4rem 0 .2rem}
/* the playground's editor; its token colors are the dl- colors above */
.CodeMirror{color:var(--ink);background:#fff;line-height:1.55;font-size:.9rem}
.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 .5rem}
.CodeMirror-lines{padding:.5rem 0}
.CodeMirror-gutters{background:var(--paper-2);border-right:1px solid var(--line-2)}.CodeMirror-linenumber{color:var(--ink-2);padding:0 .6rem 0 .4rem}
.CodeMirror-cursor{border-left:2px solid var(--ink)}
.CodeMirror-selected,.CodeMirror-focused .CodeMirror-selected{background:#d9e8f6}
.CodeMirror-focused .CodeMirror-activeline-background{background:#f7f9fb}
/* the app's own pages get the same base; two example colors live in app.css */
.balance{font-size:1.3rem}.error{color:var(--error)}
/* the sign-in pages: no navigation, because the reader is no one yet */
.dl-sign-in{max-width:30rem;margin:0 auto;padding:2rem 1.25rem 4rem}.dl-sign-in .button{display:inline-block;text-decoration:none}
.dl-sign-out{display:inline;margin:0}.dl-sign-out button{background:none;border:0;border-bottom:2px solid transparent;border-radius:0;color:#fff;font-weight:400;padding:.25rem .1rem;min-height:0;cursor:pointer}.dl-sign-out button:hover,.dl-sign-out button:focus-visible{background:none;border-bottom-color:#fff}
button.dl-quiet{background:none;color:var(--primary);border:1px solid var(--line);font-weight:400;font-size:.9rem;padding:.2rem .6rem;min-height:0}button.dl-quiet:hover{background:var(--paper-2);color:var(--primary-darker)}
/* the editor and, beside it, what the text does */
.dl-main:has(.dl-workbench){max-width:none}
.dl-workbench{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:1.5rem;align-items:start}
@media(max-width:70rem){.dl-workbench{grid-template-columns:1fr}}
.dl-workbench .CodeMirror{border:1px solid var(--ink-2);border-radius:.2rem;height:auto}
.dl-workbench .CodeMirror-focused{outline:.25rem solid var(--focus)}
.dl-beside{position:sticky;top:.5rem;max-height:calc(100vh - 1rem);overflow:auto;padding-right:.25rem}
.dl-beside .flow{margin-top:0;border-top:0;padding-top:0}.dl-beside .flow h2,.dl-beside .flow>.hint{display:none}
.dl-beside .flow-group{border-left:.3rem solid transparent;padding-left:.6rem;cursor:pointer}
.dl-beside .flow-group.flow-here{border-left-color:var(--primary);background:var(--info-bg)}
.dl-beside .flow-group h3{margin-top:.8rem}
.dl-run-bar{margin-top:0}.dl-running{opacity:.55}
.dl-drawn .result-frame{min-height:20rem}
.dl-error-line{background:var(--error-bg)}
/* the flow: what a step did, a warning where the rows ran out, and one row worked through */
.flow-name{font-weight:700}.flow-text{color:var(--ink-2)}
.flow-warn{color:var(--error)}.steps li.flow-warned::before{background:var(--error)}
.flow-inner{margin:.35rem 0 .2rem;padding:.35rem .7rem;border-left:2px dotted var(--line);font-size:.92rem}
.flow-inner p{margin:0 0 .2rem}.steps-inner{list-style:none;margin:0;padding:0}.steps-inner li{padding:.1rem 0}.steps-inner li::before{display:none}
.dl-beside .flow-home .flow-file,.dl-beside .flow-home .flow-text{display:none}
.flow-skipped h3{font-weight:400}.flow-skip{color:var(--ink-2);font-style:italic}
.dl-stale::before{content:"The text changed after this run. Press Show the flow to run it again.";display:block;color:var(--ink-2);font-size:.9rem;font-style:italic;margin:0 0 .5rem}
.dl-stale .flow,.dl-stale>details{opacity:.6}
.dl-line-note{margin:.2rem 0 .8rem}
.dl-run-at{margin:0 0 .6rem}.dl-run-at summary{cursor:pointer;color:var(--primary);font-size:.92rem}.dl-run-at label{margin-top:.3rem}
/* a long_text column: a field for a few lines, in the page's own font, and its lines kept where it is shown */
textarea.dl-long-text{font:inherit;min-height:7rem;max-width:40rem}
.dl-long-text-shown{white-space:pre-line}
.dl-fn-help{position:absolute;z-index:50;max-width:28rem;background:var(--paper);border:1px solid var(--line);border-radius:.3rem;box-shadow:0 4px 14px rgb(0 0 0/.15);padding:.6rem .8rem;font-size:.85rem;line-height:1.45}
.dl-fn-help>*{display:block;margin:0 0 .3rem}.dl-fn-help>:last-child{margin-bottom:0}
.dl-fn-help-kind{color:var(--ink-2);font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.dl-fn-help-sig{font-weight:700;white-space:pre-wrap}
.dl-fn-help-gives{color:var(--ink-2)}
.dl-fn-help-example{background:var(--code-paper);border:1px solid var(--code-line);border-radius:.2rem;padding:.2rem .4rem;white-space:pre-wrap}
