/* hidden.css · the parts of the site nobody announces: the command line, the logbook, the ruler, the gull, the paper version */
.hid { width: min(560px, calc(100vw - 24px)); max-height: min(76vh, 620px); box-sizing: border-box; margin: 12vh auto auto; padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: #fff; color: var(--ink); overflow: hidden; box-shadow: 0 24px 70px rgba(10,10,10,.18); overscroll-behavior: contain; font-family: var(--font); letter-spacing: -.01em; }
.hid:focus { outline: none; }
.hid[open] { display: flex; flex-direction: column; }
.hid::backdrop { background: rgba(255,255,255,.72); }
.hid button { font-family: inherit; letter-spacing: inherit; }
.hid-in { flex: none; width: 100%; height: 56px; box-sizing: border-box; padding: 0 20px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; outline: none; background: none; color: var(--ink); font: 400 17px var(--font); }
.hid-list { list-style: none; margin: 0; padding: 8px; overflow: auto; overscroll-behavior: contain; }
.hid-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 12px; border-radius: 9px; font-size: 15px; cursor: pointer; }
.hid-list li small { color: var(--mute); font-size: 13px; white-space: nowrap; }
.hid-list li[aria-selected="true"] { background: var(--paper-2, #f6f6f4); }
.hid-none { margin: 0; padding: 18px 20px; color: var(--mute); font-size: 15px; }
.hid-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.hid-top h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.hid-top p { margin: 2px 0 0; color: var(--mute); font-size: 14px; }
.hid-x { flex: none; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.hid-x:hover { border-color: var(--ink); }
.hid-log { list-style: none; margin: 0; padding: 4px 20px 18px; overflow: auto; overscroll-behavior: contain; }
.hid-log li { display: grid; grid-template-columns: 10px 1fr; gap: 2px 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.hid-log li:last-child { border-bottom: 0; }
.hid-log li::before { content: ''; width: 8px; height: 8px; margin-top: 7px; border: 1.5px solid var(--line-2); border-radius: 50%; box-sizing: border-box; }
.hid-log li.on::before { border-color: var(--blue); background: var(--blue); }
.hid-log li span { grid-column: 2; }
.hid-log li small { grid-column: 2; color: var(--mute); font-size: 13.5px; line-height: 1.45; }
.hid-log li:not(.on) span { color: var(--mute); }
.hid-time { padding: 20px; }
.hid-time b { display: block; font-size: clamp(56px, 16vw, 88px); font-weight: 500; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.hid-time p { margin: 12px 0 18px; color: var(--mute); font-size: 15px; }

/* above the sea, so a find out there is seen too */
.hid-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 400; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink); font: 500 14px var(--font); box-shadow: 0 8px 28px rgba(10,10,10,.14); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; cursor: pointer; white-space: nowrap; }
.hid-toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.hid-toast small { margin-left: 8px; color: var(--mute); font-size: 13px; font-weight: 400; }

/* the ruler */
.rul { position: fixed; inset: 0; z-index: 250; pointer-events: none; overflow: hidden; }
.rul div { position: absolute; box-sizing: border-box; }
.rul .rb { border: 1px solid var(--blue); background: rgba(31,77,255,.06); }
.rul .ra { border: 1px dashed var(--ink); }
.rul .rl { background: var(--blue); }
.rul .rt { padding: 3px 7px; border-radius: 5px; background: var(--blue); color: #fff; font: 500 11.5px/1.4 var(--mono); white-space: nowrap; }

/* hold the name */
.brand { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* the gull */
.egg-gull { position: fixed; right: clamp(20px, 6vw, 90px); bottom: 0; z-index: 110; width: 84px; height: 78px; pointer-events: none; }
.egg-gull svg { display: block; width: 100%; height: 100%; overflow: visible; }
.egg-gull path, .egg-gull circle { stroke: var(--ink); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.egg-gull .f { fill: #fff; } .egg-gull .k { fill: var(--ink); stroke: none; } .egg-gull .b { fill: var(--blue); stroke: var(--blue); }
.egg-gull .sit { display: none; }
.egg-gull.down .sit { display: block; } .egg-gull.down .fly { display: none; }
.egg-gull .wing { transform-box: fill-box; transform-origin: 50% 100%; animation: gull-w .34s ease-in-out infinite alternate; }
@keyframes gull-w { from { transform: scaleY(1); } to { transform: scaleY(.15); } }
.egg-gull .head { transform-box: fill-box; transform-origin: 40% 90%; animation: gull-h 5s steps(1) infinite; }
@keyframes gull-h { 0%, 100% { transform: none; } 30% { transform: rotate(-9deg); } 52% { transform: rotate(8deg); } 78% { transform: rotate(5deg); } }

/* on paper the homepage is one A4 sheet with the creases of a paper boat */
#paper { display: none; }
@media print {
  /* the sheet is taken out of the flow and the document itself has no height, so nothing can ever spill onto a second page
     (Safari keeps the printer's own margins, and the printable area is often shorter than A4) */
  html.has-paper, html.has-paper body { margin: 0 !important; padding: 0 !important; background: #fff !important; height: 1px !important; min-height: 0 !important; overflow: hidden !important; }
  html.has-paper body > :not(#paper) { display: none !important; }
  html.has-paper #paper { display: block !important; position: fixed; left: 0; top: 0; width: 100%; aspect-ratio: 210 / 297; overflow: hidden; }
  /* sized from the page width, not in mm: Safari prints a CSS millimetre 6.7% too long, and the creases need their true size */
  #paper svg { display: block; width: 100%; height: auto; aspect-ratio: 210 / 297; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) { .egg-gull .wing, .egg-gull .head { animation: none; } .hid-toast { transition: none; } }
