
  /* the list of routes */
  .rt-list-page { padding-block: 26px 64px; max-width: 1120px; }
  html.embed .rt-list-page { max-width: none; margin: 0; padding-inline: 24px; }
  .rt-list-page > :not(.pg-head, .breadcrumb) { max-width: 760px; }
  .rt-cards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
  .rt-card { display: grid; gap: 4px; padding: 16px 18px; background: var(--surface); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; }
  .rt-card:hover { border-color: #c9c2b0; box-shadow: 0 6px 18px rgba(var(--navy-rgb), 0.08); }
  .rt-card:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
  .rt-card-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem; overflow-wrap: anywhere; }
  .rt-card-meta { font-size: 0.92rem; color: var(--ink-prose); font-variant-numeric: tabular-nums; }
  .rt-card-sub { font-size: 0.8rem; color: var(--ink-soft); }
  .rt-new { display: inline-block; text-decoration: none; }
  .rt-note { font-size: 0.8rem; line-height: 1.45; color: var(--ink-soft); margin: 0; }

  /* the planner: a wide notebook on the left, a narrower map pushed to the right (about 38%) (phone: map above, notebook below). All text is in the typeface of the profile side bar (Inter). */
  main:has(.rt-planner) { padding: 0; }
  footer.site { margin-top: 0; }
  .rt-planner, .rt-planner * { font-family: var(--font-sans); box-sizing: border-box; }
  .rt-planner { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(280px, 0.6fr); height: calc(100dvh - var(--header-h)); font-size: 0.88rem; color: var(--ink); }
  .rt-planner [hidden] { display: none !important; }
  /* the page head runs across the top; the map then starts at the height of the route name field */
  .rt-planner:has(> .pg-head) { grid-template-rows: auto minmax(0, 1fr); }
  .rt-planner > .pg-head { grid-column: 1 / -1; margin: 0; padding: 22px 24px 14px; background: var(--white); }
  .rt-planner:has(> .pg-head) .rt-scroll { padding-top: 0; }
  .rt-planner svg:not(.leaflet-zoom-animated) { width: 16px; height: 16px; flex: none; }
  .rt-doc { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--white); }
  .rt-scroll { flex: 1; min-height: 0; overflow: auto; padding: 22px 24px 16px; overscroll-behavior: contain; }
  /* the map column: the stop search on top, the map under it, both the full width of the column */
  .rt-map { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 320px; margin: 0 24px 16px 0; }
  .rt-map-canvas { position: relative; flex: 1; min-height: 320px; background: #dfe7ee; border-radius: var(--radius-xl); overflow: hidden; }
  .rt-title { display: block; width: 100%; margin: 0 0 2px -6px; padding: 2px 6px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; color: var(--ink); text-overflow: ellipsis; }
  .rt-title:hover { border-color: var(--border); }
  .rt-title:focus-visible { border-color: var(--accent-dark); background: var(--white); outline: 2px solid var(--accent-dark); outline-offset: 2px; }
  .rt-title-static { overflow-wrap: anywhere; margin-left: 0; padding: 0; }
  .rt-tag { margin: 2px 0 16px; font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); }
  .rt-search { position: relative; flex: none; width: 100%; margin: 0 0 10px; }
  .rt-field { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-pill); box-shadow: 0 1px 2px rgba(var(--navy-rgb), 0.05); }
  .rt-field:focus-within { border-color: var(--bronze); box-shadow: 0 0 0 3px rgba(var(--bronze-rgb), 0.14); }
  .rt-field svg { width: 18px; height: 18px; color: var(--ink-soft); }
  .rt-field input { flex: 1; min-width: 0; height: 42px; border: 0; outline: 0; background: none; font: 500 0.9rem var(--font-sans); color: var(--ink); }
  .rt-field input::placeholder { color: #8a9bab; }
  .rt-results { position: absolute; z-index: 1400; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: 0 14px 36px rgba(var(--navy-rgb), 0.2); max-height: 280px; overflow: auto; overscroll-behavior: contain; }
  .rt-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); cursor: pointer; font-size: 0.92rem; }
  .rt-opt.on, .rt-opt:hover { background: var(--surface-tint); }
  .rt-opt mark { background: none; color: var(--accent-text); font-weight: 700; }
  .rt-opt small { font-size: 0.74rem; color: var(--ink-soft); white-space: nowrap; }
  .rt-fix span { color: var(--accent-text); }
  .rt-none { padding: 10px 12px; font-size: 0.88rem; line-height: 1.45; color: var(--ink-prose); }
  .rt-sub { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; font-size: 0.88rem; color: var(--ink-prose); font-variant-numeric: tabular-nums; }
  .rt-sub b { color: var(--ink); }
  .rt-speed { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); }
  .rt-speed input { width: 58px; min-height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: 600 0.9rem var(--font-sans); text-align: center; background: var(--white); color: var(--ink); }
  .rt-planner .rt-note { margin: 0 0 12px; font-size: 0.8rem; line-height: 1.45; color: var(--ink-soft); }
  .rt-sharebox { display: grid; gap: 8px; margin: 0 0 14px; padding: 12px; background: var(--surface-tint); border-radius: var(--radius-lg); }
  .rt-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .rt-row input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-md); font: 0.9rem var(--font-sans); background: var(--white); }
  .rt-planner input:focus-visible, .rt-planner button:focus-visible, .rt-planner select:focus-visible, .rt-planner textarea:focus-visible, .rt-planner a:focus-visible, .rt-planner summary:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
  .rt-in { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); font: 0.88rem/1.45 var(--font-sans); color: var(--ink); background: var(--white); resize: none; }
  .rt-plain { border-color: transparent; background: transparent; padding-inline: 8px; }
  .rt-plain:hover { border-color: var(--border); }
  .rt-plain:focus { border-color: var(--accent-dark); background: var(--white); }
  textarea.rt-in { min-height: 0; overflow: hidden; }
  .rt-plain::placeholder { color: #8a9bab; }
  .rt-stop { position: relative; display: flex; gap: 14px; padding: 4px 4px 8px; border: 1px solid transparent; border-radius: var(--radius-xl); }
  .rt-stop.sel { background: var(--white); border-color: transparent; }
  .rt-stop:focus { outline: none; }
  .rt-stop:focus-visible, .rt-stop.flash { outline: 2px solid var(--accent-dark); outline-offset: 0; }
  .rt-num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-top: 8px; border-radius: 50%; color: var(--white); font: 700 0.85rem/1 var(--font-sans); flex: none; }
  .rt-num.overnight { background: var(--navy); }
  .rt-num.lunch { background: var(--bronze); }
  .rt-num.waypoint { background: var(--ink-soft); }
  /* a stop of the route on the map: a white dot with the number in the colour of its kind, so it never looks like a dock dot of the map (filled with the colour of its kind) or a cluster (a donut) */
  .rt-pin { background: var(--white); }
  .rt-pin.overnight { color: var(--navy); }
  .rt-pin.lunch { color: var(--bronze); }
  .rt-pin.waypoint { color: var(--ink-soft); }
  .rt-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
  .rt-line { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; }
  .rt-nameinput { flex: 1 1 170px; min-width: 0; min-height: 40px; font-size: 1rem; font-weight: 600; }
  .rt-title-text { flex: 1 1 170px; min-width: 0; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; padding: 8px 0; }
  .rt-typetext { font-size: 0.8rem; color: var(--ink-soft); }
  /* the stop type sits in the row of the phone option, under the note, so the move and remove tools (top right of the card) never cover it; the name line keeps room for the tools */
  .rt-line-edit { padding-right: 104px; }
  .rt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .rt-actions .rt-add { min-height: 44px; }
  .rt-type { flex: none; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: #f1ede3; font: 600 0.8rem var(--font-sans); color: var(--ink); cursor: pointer; }
  .rt-type:hover { background: #e9e3d3; }
  .rt-type:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
  .rt-docklink { margin-left: 8px; font-size: 0.78rem; color: var(--accent-text); }
  .rt-notetext, .rt-contacttext { margin: 0; font-size: 0.88rem; line-height: 1.5; color: var(--ink-prose); overflow-wrap: anywhere; }
  .rt-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 4px 8px; }
  .rt-fld span { display: block; margin: 0 0 5px; font-size: 0.72rem; font-weight: 600; color: var(--ink-soft); }
  .rt-two .rt-in { padding-inline: 10px; }
  .rt-hint { margin: 0 8px; font-size: 0.78rem; line-height: 1.45; color: var(--ink-soft); }
  .rt-add { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 30px; margin-left: 8px; padding: 0; border: 0; background: none; color: var(--accent-text); font: 600 0.84rem var(--font-sans); cursor: pointer; touch-action: manipulation; }
  .rt-add:hover { text-decoration: underline; }
  .rt-tools { position: absolute; right: 4px; top: 4px; display: flex; background: var(--white); border-radius: var(--radius-md); box-shadow: 0 2px 10px rgba(var(--navy-rgb), 0.15); opacity: 0; transition: opacity 140ms; }
  .rt-stop:hover .rt-tools, .rt-stop:focus-within .rt-tools, .rt-stop.sel .rt-tools { opacity: 1; }
  .rt-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-soft); cursor: pointer; font: 600 1rem/1 var(--font-sans); touch-action: manipulation; }
  .rt-icon:hover:not(:disabled) { background: #f1ede3; color: var(--ink); }
  .rt-icon:disabled { opacity: 0.4; cursor: not-allowed; }
  .rt-leg { display: flex; gap: 14px; padding: 0 4px; }
  .rt-legline { position: relative; width: 30px; align-self: stretch; }
  .rt-legline::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; border-left: 2px dashed #c9c2b0; }
  .rt-legbody { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 6px 0 6px 8px; }
  .rt-legnum { font-size: 0.84rem; font-weight: 600; color: var(--ink-prose); font-variant-numeric: tabular-nums; }
  .rt-legcourse { font-size: 0.88rem; color: var(--ink-soft); }
  .rt-legland { display: block; margin-top: 4px; font-size: 0.88rem; line-height: 1.4; font-weight: 600; color: var(--danger-text); }
  .rt-legshore { display: block; margin-top: 4px; font-size: 0.86rem; line-height: 1.4; color: var(--ink-soft); }
  /* the stretch of a leg that is over land (a stop on its quay, or the piece from a closed basin to the water), drawn on the route line: client/routes.ts drawOverland */
  .rt-overland-case { stroke: #ffffff; stroke-width: 9px; stroke-opacity: 0.95; stroke-linecap: round; stroke-dasharray: none; fill: none; }
  .rt-overland { stroke: #4a5361; stroke-width: 4px; stroke-opacity: 1; stroke-linecap: round; stroke-dasharray: 0.5 7; fill: none; }
  .rt-legtext { font-size: 0.86rem; color: var(--ink-prose); overflow-wrap: anywhere; }
  .rt-leg .rt-in { font-size: 0.86rem; }
  .rt-leg .rt-add { margin-left: 0; }
  .rt-prompt { display: grid; gap: 10px; margin: 2px 0 14px 44px; padding: 14px 14px 12px; background: var(--white); border-left: 3px solid var(--bronze); }
  .rt-q { display: grid; gap: 1px; }
  .rt-q b { font-size: 0.95rem; font-weight: 600; }
  .rt-q small, .rt-pnext { font-size: 0.78rem; color: var(--ink-soft); }
  .rt-prompt .rt-in { background: var(--white); }
  .rt-prow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .rt-pnext { margin-left: auto; }
  .rt-pdone { border: 0; cursor: pointer; }
  .rt-addhint { margin: 14px 2px 0; font-size: 0.85rem; color: var(--ink-soft); }
  .rt-fine { margin: 14px 2px 0; font-size: 0.76rem; line-height: 1.5; color: var(--ink-soft); }
  .rt-empty { padding: 22px 16px; border: 1px dashed #c9c2b0; border-radius: var(--radius-lg); text-align: center; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; }
  .rt-example { padding: 4px 0 8px; }
  .rt-ghost { padding: 14px 14px 6px; border: 1px dashed #c9c2b0; border-radius: var(--radius-xl); background: #fffdf9; opacity: 0.8; user-select: none; }
  .rt-gstop { display: flex; gap: 12px; }
  .rt-gstop .rt-num { margin-top: 2px; }
  .rt-gstop b { font-size: 1rem; font-weight: 600; }
  .rt-gstop p { margin: 2px 0 4px; font-size: 0.88rem; line-height: 1.5; color: var(--ink-prose); }
  .rt-gtype { margin-left: 8px; padding: 2px 8px; background: #f1ede3; border-radius: 99px; font-size: 0.74rem; font-weight: 600; color: var(--ink-soft); }
  .rt-gphone { font-size: 0.84rem; font-weight: 600; color: var(--accent-text); }
  .rt-gleg { margin: 6px 0 8px 14px; padding-left: 26px; border-left: 2px dashed #c9c2b0; font-size: 0.84rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
  .rt-gleg p { margin: 0; font-size: 0.86rem; }
  .rt-bar { display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-top: 1px solid var(--border); background: var(--white); }
  .rt-status { margin: 0 auto 0 0; min-height: 1.1em; font-size: 0.82rem; color: var(--ink-soft); overflow-wrap: anywhere; }
  .rt-status.bad { font-size: 1.05rem; font-weight: 600; line-height: 1.35; color: var(--danger-text); }
  .rt-status.pop { animation: rt-pop 320ms cubic-bezier(0.23, 1, 0.32, 1); }
  @keyframes rt-pop { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
  .rt-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--white); color: var(--ink); font: 600 0.88rem var(--font-sans); cursor: pointer; touch-action: manipulation; transition: transform var(--ease); }
  a.rt-btn { text-decoration: none; }
  .rt-btn:hover { background: var(--surface-tint); border-color: #c9c2b0; }
  .rt-btn:active { transform: scale(0.97); }
  .rt-more { width: 40px; padding: 0; }
  .rt-save { min-height: 40px; padding: 0 22px; flex: none; white-space: nowrap; }
  .rt-save[aria-busy="true"] { opacity: 0.7; cursor: progress; }
  .rt-link { border: 0; background: none; padding: 4px 0; font: 600 0.84rem var(--font-sans); color: var(--ink-soft); cursor: pointer; text-align: left; touch-action: manipulation; }
  .rt-link:hover { color: var(--accent-text); text-decoration: underline; }
  .rt-menuwrap { position: relative; }
  .rt-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 1200; width: 300px; max-width: calc(100vw - 32px); padding: 6px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: 0 14px 40px rgba(var(--navy-rgb), 0.2); }
  .rt-mi { display: flex; align-items: flex-start; width: 100%; padding: 10px; border: 0; border-radius: var(--radius-md); background: none; text-align: left; text-decoration: none; font: inherit; color: var(--ink); cursor: pointer; touch-action: manipulation; }
  .rt-mi:hover:not([aria-disabled="true"]) { background: var(--surface-tint); }
  .rt-mi[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
  .rt-mi b { display: block; font-size: 0.88rem; font-weight: 600; }
  .rt-mi small { display: block; font-size: 0.76rem; color: var(--ink-soft); }
  .rt-danger:hover:not([aria-disabled="true"]) { color: var(--danger-text); background: var(--danger-bg); }
  .rt-msep { height: 1px; margin: 4px 6px; background: var(--border); }
  .rt-menu-note { margin: 4px 10px 6px; font-size: 0.76rem; line-height: 1.45; color: var(--ink-soft); }

  /* the try page /plan (no account): in place of Save, the call to make a free account, with Log in under it; it may wrap onto two lines on a narrow screen */
  .rt-trial .rt-bar { flex-wrap: wrap; }
  .rt-trial .rt-status { flex: 1 1 160px; min-width: 0; }
  .rt-join { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; }
  .rt-joinbtn { display: inline-flex; align-items: center; justify-content: center; white-space: normal; text-align: center; text-decoration: none; padding-block: 8px; }
  .rt-joinalt { font-size: 0.78rem; color: var(--ink-soft); }
  .rt-joinalt a { color: var(--accent-text); font-weight: 600; }
  .rt-joinalt a:focus-visible, .rt-joinbtn:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

  /* map pins (Leaflet puts them in the map, so they live here) */
  .rt-pinwrap { background: none; border: 0; }
  .rt-pin { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; font: 700 13px/1 var(--font-sans); border: 2px solid var(--white); box-shadow: 0 0 0 1px rgba(var(--navy-rgb), 0.3), 0 2px 8px rgba(var(--navy-rgb), 0.35); transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1); }
  .rt-pin.sel { transform: scale(1.18); box-shadow: 0 0 0 4px rgba(var(--bronze-light-rgb), 0.55), 0 2px 8px rgba(var(--navy-rgb), 0.35); }
  @media (prefers-reduced-motion: reduce) { .rt-pin, .rt-btn, .rt-tools { transition: none; } .rt-status.pop { animation: none; } }
  @media (max-width: 860px) {
    .rt-planner, .rt-planner:has(> .pg-head) { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
    .rt-planner > .pg-head { order: -2; padding: 16px 16px 12px; }
    .rt-map { order: -1; min-height: 0; margin: 0 16px 12px; }
    .rt-map-canvas { flex: none; height: 320px; min-height: 0; }
    .rt-scroll, .rt-planner:has(> .pg-head) .rt-scroll { overflow: visible; padding: 16px 16px 12px; }
    .rt-bar { position: sticky; bottom: 0; z-index: 5; padding: 10px 16px; }
    .rt-two { grid-template-columns: 1fr; }
    .rt-prompt { margin-left: 0; }
    .rt-pnext { margin-left: 0; flex-basis: 100%; }
    .rt-line-edit { padding-right: 0; }
    .rt-tools { position: static; opacity: 1; margin-left: auto; box-shadow: none; }
  }

  /* Captain Ock: the entry next to "Plan a new route", and the bar on a route he proposed (lib/tripPlan.ts) */
  .rt-list-page .rt-ock { vertical-align: middle; }
  .rt-list-page .rt-ock:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
  .rt-ockbar { display: grid; gap: 4px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--warn-border); border-radius: var(--radius-md); background: var(--warn-bg); color: var(--warn-text); font-size: 0.84rem; line-height: 1.45; }
  .rt-ockbar p { margin: 0; }
  .rt-ockbar [hidden] { display: none; }
