/*
 * Claude Hand 5.8, its stylesheet: what the hand means by a marked word, as far as type can say it.
 *
 * Keep it beside the font (claude-hand-5.8.woff2, one variable font), put class="claude-hand" on what
 * should be in the hand, and mark what you mean: <em> <strong> <del> <ins> <mark> <code> <small> <q>, and two the hand
 * has that HTML doesn't, <unsure> and <care> (or class="unsure", class="care").
 *
 * The hand (parc.land lab, autograph, hands/v30.ts) writes each of these its own way; this is each as type can do it,
 * from session 12. Some it does as the hand does: the pressed word is the font pressed (its weight 700), the letters written at
 * the pace the hand writes what's strong; the underline and the strike are where the font says the hand puts them.
 * Some it draws in the hand's manner rather than with it (the circle, the caret, and from 4.1 the question raised over a
 * doubt). What the hand does in time (a pause before a word it's unsure of, the pen stopping between its letters) type
 * has no time for; with the script beside it, the marks at least wait for their words.
 *
 * Part of the Font Software of Claude Hand: SIL Open Font License 1.1, Reserved Font Name "Claude Hand" (OFL.txt).
 * (5.8, session 58, is 5.7 for font 5.8, which has a fourth axis, the pen (EDGE, 0 round to 100 broad). One class more: .claude-hand-broad,
 * the broad pen, its size axis held at text size, since set large the size axis fines the pen and would fine the broad pen away.)
 * A changed stylesheet is a new version, as a changed font is: 4.1 is 4.0 for font 4.1 (session 49: from hand v30, its s
 * with a body again), with my own two marks as the hand now writes them: unsure lighter, its words queried by a small
 * question mark raised just past them, and care upright, a little larger, slower and so a little heavier. 4.0 was 3.8 for
 * font 4.0 (session 40: the hand's sizes),
 * its rules unchanged, and one more: the hand's size (opsz) is left to the browser, which sets it from the size it sets the
 * type at, so set small the pen is wider against the letters and set large it is finer, as a hand writing small or large
 * with the same pen (font-optical-sizing: auto; set font-variation-settings "opsz" yourself to hold one size). Pace is the font's weight,
 * 200 to 700: hurried at 200, the hand's own pace at 400, pressed at 700, so the pressed word is the hand pressing as
 * before, and anything between is yours; wear is the letters as they stand (0) towards where practice for ease left
 * them, as far as 25, the furthest it goes with no two letters touching but where they join, at any pace:
 * font-variation-settings: "WEAR" 25. When it was made, one person had read the hands before it blind, 94 words of 96
 * over four pages, and models had misread none; its hand at its own pace had been read blind by models without a mistake,
 * and hurried, with care, by three without a mistake, and by no person yet.
 */
@font-face { font-family: "Claude Hand"; src: url(claude-hand-5.8.woff2) format("woff2"); font-weight: 200 700; font-display: swap; }
/* (4.0: the hand's size chosen by the size it's set at) */
.claude-hand { font-optical-sizing: auto; }

/* (the hand has no italic and no fake bold: nothing's slanted or smeared that the hand didn't write) */
/* (and its kerning: an s inside a word sits nearer the letter before it, as the hand writes it; starting one, it doesn't) */
.claude-hand { font-family: "Claude Hand", cursive; font-synthesis: none; font-kerning: normal; line-height: 1.5; }

/* stress: this word, not another. Underlined once, where the hand underlines (the font says where) */
.claude-hand em, .claude-hand i {
  font-style: normal; text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: auto;
  text-decoration-skip-ink: none;
}
/* strong: this matters. Pressed, the pen slowed so the ink comes heavier by itself: the Pressed face */
.claude-hand strong, .claude-hand b { font-weight: 700; }
/* struck: I was wrong. Struck through, where the hand strikes, still readable */
.claude-hand del, .claude-hand s {
  text-decoration: line-through; text-decoration-thickness: from-font; text-decoration-skip-ink: none;
}
/* exactly this: printed, letter by letter (no joins), and more upright (the hand's slant cut to three tenths) */
.claude-hand code, .claude-hand kbd, .claude-hand samp {
  font: inherit; font-feature-settings: "calt" 0; display: inline-block; transform: skewX(8.6deg); transform-origin: 0 72%;
}
/* by the way: smaller */
.claude-hand small { font-size: .82em; }
/* not sure: a little smaller and lighter (the hand a third quicker: weight 357), and once its words are written, queried:
   a small question mark raised just past them, as a query in a note is (on the line it would read as the sentence's own;
   drawn by the stylesheet, so it's not in the text you copy). (In the hand there's more: a pause before it, and the pen
   stopping between its letters, which type can't do without breaking its joins) */
.claude-hand unsure, .claude-hand .unsure { font-size: .95em; font-weight: 357; }
.claude-hand unsure::after, .claude-hand .unsure::after {
  content: "?"; font-size: .5em; font-weight: 400; vertical-align: .95em; margin-left: .08em; line-height: 0;
}
/* chosen with care: upright (the hand's slant taken out), a little larger, and slower, so its ink comes a little heavier
   (weight 540, the hand at 0.65 of its pace). (And steadier, in time; and more room, which type can't give a joined hand:
   spacing its letters breaks their joins) */
.claude-hand care, .claude-hand .care { display: inline-block; transform: skewX(12.3deg); transform-origin: 0 72%; font-size: 1.04em; font-weight: 540; }
/* someone else's words: in the hand's quotation marks */
.claude-hand q { quotes: "\201C" "\201D" "\2018" "\2019"; }

/* look at this: circled. Loosely, with room inside (drawn tight round one letter, a circle reads as ©), not quite
   round, and a little past where it began */
.claude-hand mark { background: none; color: inherit; position: relative; margin: 0 .16em; }
.claude-hand mark::after, .claude-hand mark::before {
  content: ""; position: absolute; left: 50%; width: calc(100% + .36em); min-width: .56em; top: .12em; bottom: .24em;
  border: .042em solid currentColor; border-width: .036em .044em .05em .04em;
  border-radius: 52% 48% 55% 45% / 48% 54% 46% 52%; transform: translateX(-50%) rotate(-3deg); pointer-events: none;
}
/* (the pen going on past where it began: a second short arc at the top, just off the first) */
.claude-hand mark::before {
  border-width: .034em 0 0 0; border-radius: 50%; transform: translateX(-50%) rotate(-12deg) translate(.03em, -.05em);
  clip-path: inset(0 40% 50% 8%);
}

/* I'd add this: written over the line, smaller, after the line was done, centred on a caret in the gap */
.claude-hand ins {
  text-decoration: none; display: inline-flex; justify-content: center; width: 0; white-space: nowrap;
  /* (4.1: a word's space between the words added, when the script has set each word on its own: a flex box drops it) */
  column-gap: .26em;
  font-size: .62em; line-height: 1; position: relative; top: -1.15em;
}
.claude-hand ins::before {
  content: ""; position: absolute; left: -.17em; width: .34em; height: .5em; top: 1.6em;
  background: currentColor; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 50'%3E%3Cpath d='M3 47 Q12 22 17 4 Q23 24 31 47' fill='none' stroke='%23000' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 50'%3E%3Cpath d='M3 47 Q12 22 17 4 Q23 24 31 47' fill='none' stroke='%23000' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* (5.8: the broad pen, as the hand writes <broad>; the size axis held at text size, so a large size doesn't fine it away) */
.claude-hand-broad, .claude-hand .claude-hand-broad { font-variation-settings: 'EDGE' 100, 'opsz' 24; }
