/* NomadOS website layer: the desktop, taskbar, start menu, boot screen and the page content inside windows.
   Loaded after nomados.css. */
body { padding: 1rem 0 5.5rem; }
.desk { max-width: 66rem; margin: 0 auto; padding: 0 .9rem; }

/* taskbar: always there, the two things people need are one tap away */
.taskbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; align-items: center; gap: .4rem;
  padding: .3rem .4rem calc(.3rem + env(safe-area-inset-bottom)); background: var(--panel);
  border-top: 2px solid var(--panel-hi); box-shadow: 0 -1px var(--panel-lo); }
.taskbar .btn { min-height: 46px; padding: .4rem .8rem; }
.taskbar .clock { margin-left: auto; font-size: 1.2rem; }
.start { position: relative; }
.start > summary { list-style: none; }
.start > summary::-webkit-details-marker { display: none; }
.start > summary .ico { display: inline-block; width: 16px; height: 16px; background: var(--total); border-radius: 3px; box-shadow: inset -2px -2px rgba(0,0,0,.3); }
.start[open] > summary { border-color: var(--edge) var(--panel-hi) var(--panel-hi) var(--edge); box-shadow: inset 1px 1px var(--panel-lo); }
.startmenu { position: absolute; bottom: calc(100% + 6px); left: 0; width: 17rem; display: flex; padding: 3px; border-radius: var(--r); }
.startmenu .side::before { content: "NomadOS 2001"; }
.startmenu .side { writing-mode: vertical-rl; transform: rotate(180deg); background: linear-gradient(0deg, var(--navy), var(--cyan));
  color: #fff; font-weight: 700; letter-spacing: .12em; padding: .5rem .3rem; border-radius: 3px; }
.startmenu ul { list-style: none; margin: 0; padding: .2rem 0; flex: 1; }
.startmenu a { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; color: #000; text-decoration: none; }
.startmenu a:hover, .startmenu a:focus { background: var(--navy); color: #fff; }
.startmenu hr { border: 0; border-top: 1px solid var(--panel-lo); border-bottom: 1px solid #fff; margin: .2rem .4rem; }
.taskbar .phone b { font-family: var(--mono); }
@media (max-width: 600px) { .taskbar .phone span, .taskbar .clock { display: none; } .taskbar .total { margin-left: auto; } }

/* top of every page: the system bar with the logo */
.sysbar { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; color: #cfe6f1; }
.sysbar img { height: 58px; width: auto; background: #fff; padding: 3px; border-radius: 3px; }
.sysbar .who b { display: block; color: #fff; font-size: 1.05rem; }
.sysbar .who { font-size: .9rem; }
.sysbar .stars { margin-left: auto; text-align: right; font-size: .85rem; }
.sysbar .stars b { color: var(--amber); font-size: 1rem; display: block; letter-spacing: .1em; }
.sysbar a { color: #e5f4fb; }
@media (max-width: 600px) { .sysbar .stars { display: none; } .sysbar img { height: 46px; } }

/* window content: the old page text, readable */
.doc { font-size: 1.02rem; }
.doc h2 { font-size: 1.15rem; margin: 1.6rem 0 .45rem; color: var(--navy); padding-bottom: .2rem; border-bottom: 1px solid var(--panel-lo); }
.doc h2:first-child { margin-top: .2rem; }
.doc .lead { font-size: 1.15rem; }
.doc p, .doc li { max-width: 46rem; }
.doc .cols { display: grid; gap: 0 1.5rem; } @media (min-width: 760px) { .doc .cols { grid-template-columns: 1fr 1fr; } }
.doc figure { margin: 1rem 0; } .doc figure img { border: 2px solid; border-color: var(--panel-lo) #fff #fff var(--panel-lo); }
.doc figcaption { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.doc .portrait img { max-width: 260px; }
.doc .stars, .doc .strip, .doc .me { display: none; } /* home-page leftovers; the desktop shows these its own way */
.doc table.prices td:last-child { font-family: var(--mono); font-weight: 700; text-align: right; width: 40%; min-width: 9rem; }
/* long prices (the pad/trace row) wrap inside the column instead of pushing the table off the window */
.doc .btn { margin: .2rem 0; }
.doc .request { display: none; } /* the request form lives in its own window */

/* for-sale listings (filled in by the server) */
.sale { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--panel-lo); }
.sale > img { width: 200px; aspect-ratio: 1; object-fit: cover; border: 2px solid; border-color: var(--panel-lo) #fff #fff var(--panel-lo); }
.sale h2 { margin: 0 0 .3rem; border: 0; font-size: 1.15rem; }
.sale-price { font: 1.5rem/1 var(--lcdf); color: var(--lcd); background: var(--lcd-bg); display: inline-block; padding: .25rem .5rem .15rem; }
.sale-tag { font: 700 .75rem var(--ui); text-transform: uppercase; margin-left: .5rem; padding: .1rem .4rem; background: var(--amber); color: #000; vertical-align: middle; }
.sale-tag.sold { background: var(--bad); color: #fff; } .sale.is-sold { opacity: .6; }
.thumbs { display: flex; gap: .35rem; flex-wrap: wrap; } .thumbs img { width: 60px; height: 60px; object-fit: cover; }
.ask { display: inline-flex; margin-top: .4rem; } @media (max-width: 600px) { .sale { grid-template-columns: 1fr; } .sale > img { width: 100%; } }

/* home desktop */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.2rem; align-items: center; }
.hero h1 { font-size: 2.1rem; margin: .1rem 0 .6rem; }
.hero p.lead { font-size: 1.12rem; margin: 0 0 .5rem; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero h1 { font-size: 1.65rem; } }
.key .lcd { font-size: 1.15rem; align-self: flex-start; }
.steps { margin: .2rem 0 0; padding-left: 1.3rem; } .steps li { margin: .45rem 0; }
.me { display: grid; grid-template-columns: 170px 1fr; gap: 1rem; align-items: start; }
@media (max-width: 600px) { .me { grid-template-columns: 1fr; } .me .photo { max-width: 180px; } }

/* request form window */
.reqgrid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 1.2rem; }
@media (max-width: 820px) { .reqgrid { grid-template-columns: 1fr; } }
#reqform { display: grid; gap: .75rem; }
#reqform .hp { position: absolute; left: -9999px; }
#reqform .status { margin: 0; font-weight: 700; }
#reqform button { justify-self: start; }

/* instant estimate */
.est h3 { margin: .9rem 0 .5rem; font-size: 1rem; }
.est .keys { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.est .key { min-height: 4.2rem; justify-content: center; }
.readout { margin-top: 1rem; padding: .9rem 1rem; }
.readout .what { font-weight: 700; margin-bottom: .4rem; }

/* boot screen: once per visit, skip with a tap, never for reduced motion */
.boot { position: fixed; inset: 0; z-index: 2000; background: #000; color: var(--lcd); font: 1.35rem/1.35 var(--lcdf);
  padding: 2rem; text-shadow: 0 0 6px rgba(77,255,122,.6); cursor: pointer; }
.boot .bar { margin-top: 1rem; width: min(22rem, 80vw); height: 14px; border: 2px solid var(--lcd); }
.boot .bar i { display: block; height: 100%; width: 0; background: var(--lcd); animation: fill .9s steps(12) forwards; }
@keyframes fill { to { width: 100%; } }

/* CRT touch icons across the top: every app, one tap */
.iconbar { display: flex; align-items: flex-end; gap: .4rem; overflow-x: auto; padding: .55rem .5rem .5rem; margin: 0;
  scroll-snap-type: x proximity; scroll-padding-inline: .5rem; scrollbar-width: none; position: relative;
  /* inside of the cubby: flat dark plastic with a 2-pixel dither, sunken bevel on all four sides */
  background-color: #3b3c38;
  background-image: linear-gradient(45deg, #353632 25%, transparent 25%, transparent 75%, #353632 75%),
                    linear-gradient(45deg, #353632 25%, transparent 25%, transparent 75%, #353632 75%);
  background-size: 4px 4px; background-position: 0 0, 2px 2px;
  border: 2px solid; border-color: var(--panel-lo) var(--panel-hi) var(--panel-hi) var(--panel-lo);
  box-shadow: inset 2px 2px 0 #000; }
/* the first key rests against the left edge, the last against the right, with the same gap at both ends */
.ikey:last-child { scroll-snap-align: end; }
.iconbar::-webkit-scrollbar { display: none; }
.iconrail { position: relative; margin: 0 0 1rem; }
.iconrail .iconbar { margin: 0; }
.iconrail .ikey { border-radius: var(--r); }
/* the metal rail lip under the keys, so they rest on something */
/* the shelf board the keys stand on: top surface catching light, then the front edge */
/* the cubby frame: raised beige-gray plastic on all four sides, thicker at the bottom like a shelf board */
.iconrail { padding: 6px 6px 10px; background: var(--panel); border-radius: var(--r);
  border: 2px solid; border-color: var(--panel-hi) var(--edge) var(--edge) var(--panel-hi);
  box-shadow: inset -1px -1px var(--panel-lo), inset 1px 1px #fff, 3px 3px 0 rgba(0,0,0,.45); }

.ikey { flex: 0 0 auto; width: 5.4rem; min-height: 5.6rem; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .35rem; padding: .45rem .2rem; text-decoration: none; color: #000; border-radius: var(--r); scroll-snap-align: start;
  background: var(--panel); border: 2px solid; border-color: var(--panel-hi) var(--edge) var(--edge) var(--panel-hi);
  box-shadow: inset -1px -1px var(--panel-lo), inset 1px 1px #fff, 3px 0 0 rgba(0,0,0,.4); }
.ikey svg { width: 40px; height: 40px; image-rendering: pixelated; }
.ikey span { font-size: .78rem; text-align: center; line-height: 1.15; }
.ikey:focus-visible { outline: 2px dotted #fff; outline-offset: 2px; }
.ikey:active, .ikey.on { border-color: var(--edge) var(--panel-hi) var(--panel-hi) var(--edge); box-shadow: inset 1px 1px var(--panel-lo); }
.ikey.on { background: #b3afa4; }
.ikey.on span { background: var(--navy); color: #fff; padding: 0 .25rem; outline: 1px dotted #fff; }
@media (min-width: 1000px) { .iconbar { justify-content: space-between; } .ikey { width: 4.9rem; } }
@media (max-width: 600px) { .ikey { width: 4.7rem; min-height: 5rem; } .ikey svg { width: 34px; height: 34px; } }

/* phones: no sideways scrolling, ever. Price tables become stacked rows: job, then its price on an LCD. */
html, body { overflow-x: clip; }
.win, .body, .doc { min-width: 0; }
@media (max-width: 640px) {
  .doc table.prices, .doc table.prices tbody, .doc table.prices tr, .doc table.prices td { display: block; width: 100%; }
  .doc table.prices tr:first-child { display: none; }
  .doc table.prices tr { padding: .55rem .6rem; border-bottom: 1px solid #d9d6cc; }
  .doc table.prices td { border: 0; padding: 0; background: none !important; }
  .doc table.prices td:last-child { text-align: left; white-space: normal; margin-top: .3rem; font: 1.25rem/1.1 var(--lcdf);
    color: var(--lcd); background: var(--lcd-bg) !important; display: inline-block; width: auto; padding: .25rem .5rem .15rem;
    text-shadow: 0 0 6px rgba(77,255,122,.5); }
  .doc table:not(.prices) { display: block; overflow-x: auto; }
}

/* ================= NomadOS Pocket: the phone is a 2001 handheld terminal ================= */
.pocketbar, .pocketkeys, .slidehint { display: none; }
/* desktop navigates with the Start menu; the cubby belongs to Pocket */
.iconrail { display: none; }
@media (max-width: 640px) {
  body { padding: 0 0 1rem; background: #1b1d1f; }
  body.crt::after { background: repeating-linear-gradient(0deg, rgba(0,0,0,.03) 0 1px, transparent 1px 3px); }
  /* the rubber bezel top: logo, model name, St. Cloud temperature, clock */
  .pocketbar { display: flex; align-items: center; gap: .5rem; position: sticky; top: 0; z-index: 950;
    padding: .45rem .7rem; background: linear-gradient(180deg, #3a3d40, #26282a); border-bottom: 3px solid #111;
    box-shadow: 0 2px 0 #4a4d50 inset; color: #d6d6d0; font: 700 .8rem var(--ui); }
  .pocketbar img { height: 30px; width: auto; background: #fff; padding: 2px; border-radius: 2px; }
  .pocketbar .brand { letter-spacing: .02em; font-size: .9rem; }
  /* the label lives in CSS so search engines do not read "NomadOS Pocket" as something the shop offers */
  .pocketbar .brand::before { content: "NomadOS "; }
  .pocketbar .brand::after { content: "Pocket"; color: var(--total); font-style: italic; font-weight: 400; }
  .pocketbar .clock { font-size: 1rem; padding: .1rem .35rem 0; margin-left: auto; }
  .pocketbar .wx:not([hidden]) + .clock { margin-left: .5rem; }
  /* the screen: one app at a time, edge to edge */
  .desk { padding: 0; }
  .sysbar { display: none; }
  main .win { border-radius: 0; margin: 0 0 .5rem; border-left: 0; border-right: 0; }
  main .win .tb { border-radius: 0; }
  main .win .tb i { display: none; }
  .glassnote { color: #9aa; padding-bottom: 1rem; }
  /* the sliding cubby is Pocket's app switcher on every screen */
  .iconrail { display: block; margin: .5rem .5rem .6rem; padding-right: 16px; transition: padding .28s ease; }
  .iconrail.l-on { padding-left: 16px; }
  .iconrail.r-off { padding-right: 6px; }
  /* shallow triangles pressed into the sides of the frame: a side thickens and shows its triangle only while there is more to slide to that way */
  .slidehint { display: block; position: absolute; top: 0; bottom: 4px; margin: auto 0; width: 6px; height: 72px; pointer-events: none;
    fill: #5d5a51; filter: drop-shadow(.8px .8px 0 rgba(255,255,255,.9)); transition: opacity .28s ease; }
  .slidehint.r { right: 5px; animation: slidehint 1.6s ease-in-out 1.2s 2; }
  .slidehint.l { left: 5px; opacity: 0; }
  .iconrail.l-on .slidehint.l { opacity: 1; }
  .iconrail.r-off .slidehint.r { opacity: 0; }
  @keyframes slidehint { 50% { transform: translateX(2px); } }
  @media (prefers-reduced-motion: reduce) { .iconrail, .slidehint { animation: none; transition: none; } }
  /* the hardware key strip replaces the desktop taskbar */
  .taskbar { display: none; }
  .pocketkeys { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 950; gap: .5rem;
    padding: .5rem .6rem calc(.55rem + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #2b2d30, #1a1b1d);
    border-top: 3px solid #111; box-shadow: 0 1px 0 #44474a inset; }
  .pk { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 54px;
    color: #e8e8e2; text-decoration: none; font: 700 .82rem var(--ui); border-radius: 12px;
    background: linear-gradient(180deg, #55595d, #3b3e41); border: 1px solid #111;
    box-shadow: inset 0 1px 0 #7b8085, 0 3px 0 #0c0c0d; }
  .pk:active { transform: translateY(3px); box-shadow: inset 0 1px 0 #7b8085, 0 0 0 #0c0c0d; }
  .pk.call { background: linear-gradient(180deg, #2e9a4a, #1d6e33); box-shadow: inset 0 1px 0 #6bd08a, 0 3px 0 #0c2a14; }
  .pk.req { background: linear-gradient(180deg, #e0612a, var(--total-lo)); box-shadow: inset 0 1px 0 #ff9a6a, 0 3px 0 #3d1606; flex: 1.3; }
}

/* ---- polish pass ---- */
.grid2 > fieldset { display: flex; flex-direction: column; }
.grid2 > fieldset > :last-child { margin-top: auto; }
.me .photo img { width: 100%; }
/* file picker looks like a Win98 button */
#reqform input[type=file]::file-selector-button, #reqform input[type=file]::-webkit-file-upload-button, .qform input[type=file]::file-selector-button {
  font: 700 .95rem var(--ui); min-height: 44px; padding: .4rem .9rem; margin-right: .6rem; cursor: pointer; color: #000;
  background: var(--panel); border: 2px solid; border-color: var(--panel-hi) var(--edge) var(--edge) var(--panel-hi);
  box-shadow: inset -1px -1px var(--panel-lo), inset 1px 1px #fff; border-radius: var(--r); }
@media (max-width: 640px) {
  .photos { grid-template-columns: 1fr 1fr; gap: .45rem; }
  .photos .photo figcaption { font-size: .78rem; }
  .hero .photo img { aspect-ratio: 16/10; object-fit: cover; }
  .me { grid-template-columns: 110px 1fr; gap: .8rem; }
  .me .photo { max-width: 110px; }
  .hero .btns .btn { flex: 1 1 auto; }
}
.pocketbar .wx { margin-left: auto; font: 700 .78rem var(--ui); color: #d6d6d0; white-space: nowrap; }
.taskbar .wx { font-size: 1rem; margin-left: auto; } .taskbar .wx:not([hidden]) + .clock { margin-left: .4rem; }
@media (max-width: 600px) { .taskbar .wx { display: none; } }
.clock { white-space: nowrap; }
@media (max-width: 400px) { .pocketbar .brand { font-size: .8rem; } .pocketbar .wx { font-size: .72rem; } .pocketbar { gap: .4rem; padding: .45rem .5rem; } }
@media (max-width: 360px) { .pocketbar .brand { display: none; } }

/* instant quote */
.crumbs { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; min-height: 1.2rem; margin-bottom: .4rem; font-size: .85rem; }
.est .stage h3 { font-size: 1.15rem; margin: .4rem 0 .6rem; }
.est .stage .keys { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.est .stage .key { min-height: 4.4rem; justify-content: center; }
.est .readout table { margin: .5rem 0; } .est .readout td.price { font-family: var(--mono); font-weight: 700; text-align: right; white-space: nowrap; }
.qform { display: grid; gap: .7rem; } .qform .hp { position: absolute; left: -9999px; } .qform .status { margin: 0; font-weight: 700; }
@media (max-width: 640px) { .est .stage .keys { grid-template-columns: 1fr; } .est .stage .key { min-height: 3.6rem; } }
/* quote result table: item on the left wraps, amount stays short; stacks on phones. Crumbs in normal case. */
.est .readout table td:first-child { width: 100%; }
.est .readout td.price { white-space: nowrap; }
.crumbs .tag { text-transform: none; letter-spacing: 0; font-weight: 700; font-size: .82rem; }
@media (max-width: 640px) {
  .est .readout table, .est .readout tbody, .est .readout tr, .est .readout td { display: block; width: 100%; }
  .est .readout tr { padding: .45rem .55rem; border-bottom: 1px solid #e3e0d6; }
  .est .readout td { border: 0; padding: 0; background: none !important; }
  .est .readout td.price { text-align: left; margin-top: .15rem; white-space: normal; }
}
/* every key the same height, even with a two-line label */
.iconbar { align-items: stretch; }
.ikey { height: 5.9rem; min-height: 0; }
@media (max-width: 600px) { .ikey { height: 5.4rem; } }
.startmenu a svg { flex: 0 0 24px; image-rendering: pixelated; }
.tb > svg { flex: 0 0 20px; image-rendering: pixelated; background: var(--panel); border: 1px solid; border-color: #fff var(--edge) var(--edge) #fff; padding: 1px; box-sizing: content-box; }
.startlogo { width: 20px; height: 20px; border: 1px solid var(--edge); background: #fff; }
.est .stage .key.withicon { display: grid; grid-template-columns: 34px 1fr; column-gap: .6rem; align-items: center; justify-content: stretch; }
.est .stage .key.withicon svg { grid-row: 1 / span 2; width: 32px; height: 32px; image-rendering: pixelated; }
.est .stage .key.withicon small { grid-column: 2; }
/* every answer key on a quote screen is the same size (rows match the tallest key) */
.est .stage .keys { grid-auto-rows: 1fr; }
#bench > figure:nth-child(n+9) { display: none; } /* without JavaScript, show the first 8 */
.photo picture { display: block; } .photos .photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.hero .photo img { width: 100%; height: auto; }
.sale-price small { font: 400 .8rem var(--ui); color: #9fd8a8; margin-left: .3rem; }

/* call / text keys + star line: phones only (the desktop has them in the taskbar and header) */
.reach { display: none; }
@media (max-width: 640px) {
  .reach { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0 .2rem; }
  .reach .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
  .reach .gstars { flex: 1 1 100%; font-size: .85rem; color: inherit; }
  .reach .gstars b { color: #b46a00; letter-spacing: .08em; margin-right: .35rem; }
}

#reqform .need, .qform .need { margin: -.3rem 0 0; font-size: .9em; opacity: .8; }
#reqform .bad, .qform .bad { outline: 3px solid #b3261e; outline-offset: 1px; }
#reqform p.bad, .qform p.bad { outline: 0; color: #a3140c; font-weight: 700; opacity: 1; }

/* home help: travel calculator */
.milecalc { margin: .4rem 0 1rem; } .milecalc label { display: block; margin-bottom: .3rem; } .milecalc .mcrow { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; } .milecalc input { width: 7.5em; } .mcout { margin: .5rem 0 0; font-weight: 700; min-height: 1.3em; }
