/* Code's article's visuals (article/codeArticle.js): the notes app's own screens, in its own look, which stays light
   at night, drawn in its colour, --app-tint. */

.of-code .code-phone { position: relative; display: flex; flex-direction: column; flex: none; width: 182px; height: 372px; overflow: hidden; border: 6px solid #1c1b19; border-radius: 31px; background: #fff; color: #1d1d1f; font: 12px/1.35 -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif; box-shadow: 0 22px 40px -22px rgba(0, 0, 0, .4); transition: transform .6s var(--move), box-shadow .5s var(--soft); }
.of-code .code-phone.code-big { width: 222px; height: 412px; border-radius: 36px; }
.of-code .code-clock { display: flex; flex: none; justify-content: space-between; padding: 8px 18px 0; font-size: 10.5px; font-weight: 600; }
.of-code .code-body { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; padding: 12px 12px 6px; text-align: center; }

/* ---- the first minute: three screens, one chosen, and what is put on them ---- */
.of-code .code-screens { display: flex; justify-content: center; align-items: flex-start; gap: 13px; }
.of-code .code-col { display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; }
.of-code .code-col.code-chosen .code-phone { transform: translateY(-5px); box-shadow: 0 0 0 3px var(--app-tint), 0 28px 44px -22px rgba(0, 0, 0, .45); }
.of-code .code-col.over .code-phone { transform: translateY(-5px) scale(1.025); }
.of-code .code-name { padding: 2px 8px; border: 0; border-radius: 6px; background: none; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.of-code .code-col.code-chosen .code-name { font-weight: 600; color: var(--ink-strong); }
.of-code .code-body h5 { margin: 0 0 6px; border-radius: 6px; outline: 1.5px solid transparent; font-size: 17px; line-height: 1.18; font-weight: 700; letter-spacing: -0.02em; cursor: text; transition: outline-color .25s, box-shadow .4s var(--soft); }
.of-code .code-body h5:is(:hover, :focus) { outline-color: color-mix(in srgb, var(--app-tint) 60%, transparent); }
.of-code .code-under { margin: 0 0 6px; font-size: 11.5px; line-height: 1.45; color: #6e6e73; }
.of-code .code-foot { flex: none; padding: 4px 12px 11px; }
.of-code .code-dots { display: flex; justify-content: center; gap: 5px; margin-bottom: 8px; }
.of-code .code-dots i { width: 5px; height: 5px; border-radius: 3px; background: #d7d7da; }
.of-code .code-dots i.code-on { width: 14px; background: var(--app-tint); }
.of-code .code-cta { padding: 8px; border-radius: 12px; background: var(--app-tint); font-size: 12px; font-weight: 600; text-align: center; color: #fff; transition: background-color .6s var(--soft), box-shadow .4s var(--soft); }
.of-code .code-slot { flex: none; }
.of-code .code-added { position: relative; margin: 3px 1px 5px; padding: 4px; border: 1.5px dashed color-mix(in srgb, var(--app-tint) 75%, transparent); border-radius: 12px; }
.of-code .code-off { position: absolute; right: 2px; top: 2px; z-index: 2; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: #1d1d1f; font-size: 11px; line-height: 18px; color: #fff; opacity: 0; transition: opacity .25s; }
.of-code .code-added:hover .code-off, .of-code .code-off:focus-visible { opacity: .85; }
.of-code .code-art .code-view { display: block; width: 100%; height: 64px; border-radius: 8px; object-fit: cover; }
.of-code .code-promises { margin: 0; padding: 0; list-style: none; font-size: 11px; text-align: left; }
.of-code .code-promises li { display: flex; align-items: center; gap: 6px; padding: 2px; }
.of-code .code-promises li::before { content: "✓"; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 5px; background: color-mix(in srgb, var(--app-tint) 20%, #fff); font-size: 10px; font-weight: 700; color: var(--app-tint); }
.of-code .code-realnote { padding: 6px 8px; border-radius: 8px; background: #fff8e1; font-size: 10.5px; text-align: left; }
.of-code .code-realnote b { display: block; font-size: 11px; }
.of-code .code-said { padding: 2px 6px; font: italic 12px/1.4 Georgia, serif; }
.of-code .code-skip { padding: 4px; border: 1.5px solid var(--app-tint); border-radius: 10px; font-size: 11px; font-weight: 600; color: var(--app-tint); }

/* ---- the note, and what it could say ---- */
.of-code .code-big .code-body { text-align: left; }
.of-code .code-big h5 { margin: 0 0 6px; font-size: 17px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.of-code .code-line { margin: 0; padding: 5px 0; font-size: 12px; line-height: 1.45; }
.of-code .code-who { display: block; width: fit-content; margin-bottom: 2px; padding: 0 7px; border-radius: 10px; background: color-mix(in srgb, var(--app-tint) 14%, #fff); font-size: 9px; font-weight: 600; line-height: 1.6; color: var(--app-tint); }
.of-code .code-banner { margin: 0 0 8px; padding: 6px 10px; border-radius: 9px; background: #fdecc8; font-size: 10.5px; font-weight: 600; color: #8a5a00; }
.of-code .code-twice { margin: 4px 0; padding: 7px; border: 1.5px solid var(--app-tint); border-radius: 10px; font-size: 11px; }
.of-code .code-twice p { margin: 0 0 4px; padding: 4px 7px; border-radius: 6px; background: #fff1b8; }
.of-code .code-twice span { display: inline-block; padding: 2px 9px; border-radius: 6px; background: var(--app-tint); font-size: 10px; font-weight: 600; color: #fff; }

/* ---- the home screen: four places across, the widget taking four of them small, or eight wide ---- */
.of-code .code-home { background: linear-gradient(165deg, #53708f, #8a6f8e 55%, #c99a76); color: #fff; }
.of-code .code-apps { display: grid; grid-template-columns: repeat(4, 40px); grid-auto-rows: 40px; justify-content: space-between; gap: 14px 0; padding: 14px 16px; }
.of-code .code-apps i { border-radius: 10px; background: rgba(255, 255, 255, .32); }
.of-code .code-apps i.code-app { background: var(--app-tint); transition: background-color .6s var(--soft), box-shadow .4s var(--soft); }
.of-code .code-widget { grid-column: span 2; grid-row: span 2; overflow: hidden; padding: 10px 11px; border-radius: 18px; background: #fff; font-size: 11px; line-height: 1.3; color: #1d1d1f; }
.of-code .code-widget.code-wide { grid-column: span 4; }
.of-code .code-widget small { display: block; margin-bottom: 4px; font-size: 9.5px; font-weight: 700; color: var(--app-tint); }

/* ---- narrow: the chosen screen alone, under the three names, which choose ---- */
@container (width < 760px) {
  .of-code .code-screens { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: 12px 4px; }
  .of-code .code-col { display: contents; }
  .of-code .code-name { grid-row: 1; min-height: 36px; padding: 4px 10px; }
  .of-code .code-col.code-chosen .code-name { background: color-mix(in srgb, var(--app-tint) 13%, var(--paper)); }
  .of-code .code-col:not(.code-chosen) .code-phone { display: none; }
  .of-code .code-col.code-chosen .code-phone { grid-row: 2; grid-column: 1 / -1; justify-self: center; transform: none; }
}
